Subversion backup script (multiple repos, unlimited directory depth)
Ulf Benjaminsson
ulf at ulfben.com
Wed Jan 30 10:14:06 UTC 2008
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20080130/497fa78e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svn-backup.sh
Type: application/x-sh
Size: 4033 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-server/attachments/20080130/497fa78e/attachment.sh>
More information about the ubuntu-server
mailing list