backing-up multiple repositories with complicated schedules goals: 1. Protect against corrupt/accidentally killed database. By creating a hotcopy every so often, we'll be good to go if the drive goes 'clunk', (assuming that the backups are on another drive or machine.) Just get a new drive, and drop-in the last hot-copy (maybe reading in some incrementals?) 2. Protect against burned/exploded machine. Someone should 'pick-up' the backups directories on a scheduled basis and put them somewhere safe. This can be scheduled with a cron job and rsync or whatever. 3. Ease upgrades and recovery. If the whole machine went down, but was getting old anyway, the dumped versions can be read-in to a new version without having to first install the old version. requirements: YAML.pm (for reading config files) scheduler (runs the scheduled jobs) hot-backup.py (if you want to run hot-copies) inc_backup (if you want 'smart' incremental backups) plan: store tools in one location (/usr/local/svn_hop/backup_tools/) symlink these into place setup: # do this as root mkdir /var/backups/svn/ chown www-data:www-data /var/backups/svn/ mkdir /usr/local/svn_hop/ chown www-data:www-data /usr/local/svn_hop/ su - www-data # get the tools cd /usr/local/svn_hop/ fetch=http://ericwilhelm.homeip.net/svn/Module-Subversion-Juggle/ svn co $fetch/trunk/data/backup_tools/ cd /var/backups/svn/ # create the tree: for r in loc pub do mkdir $r for i in full hot inc run do mkdir $r/$i done done # make a schedule in /schedule for each of your repos # see $fetch/trunk/data/backup_samples/schedule # symlink the stuff into place for r in loc pub do ln -s /usr/local/svn_hop/backup_tools/post-commit /var/svnroot/$r/hooks for i in full hot inc do ln -s /usr/local/svn_hop/backup_tools/$i /var/backups/svn/$r/run/$i done # this is optional touch /var/backups/svn/$r/inc/check_full done summary: Now we have a tree like so: |-- loc | |-- full | | |-- fulldump.000050 | | |-- ... | | `-- fulldump.000800 | |-- hot | | |-- loc-11 | | |-- ... | | `-- loc-881 | |-- inc | | |-- check_full | | |-- incdump.000000-000009 | | |-- ... | | `-- incdump.000811-000815 | |-- logfile | |-- run | | |-- full -> /usr/local/svn_hop/backup_tools/full | | |-- hot -> /usr/local/svn_hop/backup_tools/hot | | `-- inc -> /usr/local/svn_hop/backup_tools/inc | `-- schedule `-- pub |-- full | |-- fulldump.000050 | |-- ... | `-- fulldump.000150 |-- hot | |-- pub-11 | |-- ... | `-- pub-151 |-- inc | |-- check_full | |-- incdump.000000-000009 | |-- ... | `-- incdump.000141-000145 |-- logfile |-- run | |-- full -> /usr/local/svn_hop/backup_tools/full | |-- hot -> /usr/local/svn_hop/backup_tools/hot | `-- inc -> /usr/local/svn_hop/backup_tools/inc `-- schedule