There are HW/SW accidents in real world. Unfortunatelly it could come to you server too. Save your time: spend a half of hour today with arranging a simple script than boring days later!
Back-up TestLink installation It's useful to have the last working configuration in extra back-up. Minimal list contains: custom_config.inc.php, config_db.inc.php and configuration for connection to you bug tracker (if any). You should make some modification and patches. We suggest to backup all the directory after any change then. Database back-up There are two things to back-up daily: database and attachments. You could use sophisticated tool to store back-up files, store to back-up files to another server or use raid to suppress a storage failure. Create a script that collect data from database and attachment folder. An example for Linux environment follows. #!/bin/ # Script for backup TestLink service # create filenames mydate=`date +%y%m%d` backup_folder="/home/gat/backup" upload_folder="/home/gat/web/testlink/upload_area/" filename1="$backup_folder/testlink_db_$mydate.bck.sql" filename2="$backup_folder/testlink_upload_$mydate.bck.tgz" # dump data mysqldump -uroot -pyour_password testlink_17 > $filename1 # compress gzip -f9 $filename1 # backup attachments tar -cvzf $filename2 $upload_folder # save to backuped area on server titan # mount titan:/export/gat /home/gat/backup/titan/ -o soft,nosuid,rw,noauto,user,noexec #cp $filename.gz /home/gat/backup/titan/ The script create two compressed files with date in file name. There is also commented possibility to mount another server and copy back-up files to another server. Now you have a script that can do back-up. You need to set-up system to run it every day. Linux/Unix offers cron service to do it. There is example of settings (root execute the script as user gat): europa> crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.20829 installed on Fri Aug 6 11:56:56 2004) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 15 2 * * * su - gat -c /home/gat/backup/db_backup.sh >/dev/null 2>&1 Do not postpone back-up to never!
|