I had Lukas Sandström develop a bashscript for me to help with backing up all my SVN-repos. It's built on Vincent Danen's "Automate subversion backups<http://www.builderau.com.au/program/linux/soa/Automate-subversion-backups/0,339028299,339281519,00.htm>", but is fitted to my needs: nightly full backups, descending into subdirs & logged output. Hopefully someone else finds this useful too. Realeased under a BSD-license, here's what it can do for you:
* compressed (tar.bz2) hotcopy of *every repo in the basedir and any subdir of basedir* * archives are named in the format: repodirname-date-revision.tar.bz2 * creates new copy *only if revision has changed* since last run * loggfile in the output directory * optional: do incremental backups (*untested*) *Suggested improvements: * Logg a timestamp when starting a repo backup (to see how long compression etc. took) Some clean up might be nice if you're short on space A more robust way to identify repo root directories. (current way: look for the file "format", though not if it's found in the dir "db/" - this is what my repos look like <http://share.ulfben.com/svndirstruct.png>) Happy hacking! //Ulf Benjaminsson www.ulfben.com
svn-backup.sh
Description: Bourne shell script
-- ubuntu-server mailing list ubuntu-server@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-server More info: https://wiki.ubuntu.com/ServerTeam