Posted 2007/09/03
Paranoid backups with rsync
Using the same technique I protected my PhD thesis with I have started backing up GridSphere (GS) every hour.
When Java apps go wrong they have a tendency to throw massive m=nested exceptions which only make vague sense to the author of the software. Now that I have put some serious effort into the VERA GS container I want a way to roll back changes in case of emergency.
I use cron and rsync to backup the portals directory every hour, keeping the last 24.
Script
skutter:~# cat /root/bin/portals_backup.sh
#!/bin/sh
mkdir "/opt/backups/`date +%H`/" 2> /dev/null;
touch "/opt/backups/`date +%H`/";
nice rsync -avz --delete --delete-after /opt/portals "/opt/backups/`date +%H`/";
Cron
10 * * * * /root/bin/portals_backup.sh &> /dev/null