Drakbackup is performing its job on each machine (around 1 am). Then, a cron job runs like:
15 5 * * * rsync -avub -e ssh physmed.chuq.qc.ca:backup/ ~/backup/physmed > /dev/null 2>&
Now, I should try to make drakbackup perform a full backup once in a while...
** New
on physmed, we run every sunday
15 23 * * 0 /home/pdespres/shellscripts/hot-backup.py --num-backups=5 /var/www/svn/radio_onco_physique /home/pdespres/backup/svn
(see script in shellscripts on SVN)
then each day:
15 1 * * * /home/pdespres/perl/svn-incremental.pl > /dev/null 2>&1
that creates a full backup named radio_onco_physique_REV-N.bz2 where REV is the revision number and N is a incremental num going from 1 to 5 (old backups will be removed by the hot-backup script). This way, we have a 5 weeks to react if something goes wrong (data corruption). Compression ration is typically poor and takes a lot of time so we let it uncompressed.
The copy is local to physmed. Now we do a rsync command from oncoweb that will sync the content of ~/backup/svn on mammouth through NFS (/mammouth/backup). This comes later in the night, since it cannot be initiated from physmed on the DMZ (must be initiated by oncoweb).
Now we can do an incremental dump every night.
I have these lines to hot-backup.py, to remember the last full backup:
f=open(backup_dir + '/latest_rev.txt','w')
f.write(youngest)
f.close()
(around line 222, just before print("Youngest revision is %s" % youngest))
Now I can do a svn dump every night with:
svn-incremental.pl (see SVN for the script)
and also sync them to mammouth:
15 2 * * * rsync -avu -e ssh physmed.chuq.qc.ca:backup/svn /mammouth/backup/
House keeping need to be done ... to be continues
Monday, October 3, 2011
Subscribe to:
Post Comments (Atom)
1 comment:
I just looked up what the -a flag does and it solved some issues I had with my rsync backups. Changing my backup scripts momentarily.
Thanks for the (unintentional) tip!
Post a Comment