Ref. to http://darcynorman.net/2006/04/05/automatically-backing-up-multiple-subversion-repositories/
I’ve just put together a dead simple script to automatically dump all of them to a directory of my choosing. I’ve added this script to the crontab for the root user on the server, and it runs
svndump on all repositories,
gzipping the output for archive (and possibly restore).
The output is stored in a specified backup directory, which is then picked up via
rsync from my backup desktop, and copied to the external backup drive.
Create a crontab daily job:
ls -1 $SVN_REPOSITORIES_ROOT_DIR > /tmp/bkreposlist
for REPOSITORY in `cat /tmp/bkreposlist` ;
echo ‘dumping repository: ‘ $REPOSITORY
svnadmin dump $SVN_REPOSITORIES_ROOT_DIR$REPOSITORY | gzip > $BACKUP_DIRECTORY$REPOSITORY’.gz’