This script does an svn hotcopy of a subversion repository and then rsyncs it to an external location. Easy to script, nice trouble-free way of maintaining subversion backups.
#!/bin/sh
export RSYNC_RSH=/usr/bin/ssh
# some variables in case they change later
server=destination.com # where we are sending the backup to
user=diveli
tempcopy=/home/diveli/svnbackup
dest=/media/disk/svnserver/svnbackup
# example svn repository
# make the backup with svnadmin hotcopy
svnadmin hotcopy /data1/svn/repo/ ${tempcopy}/repo/
# rsync it to the external hard drive on my desk
rsync -aHPvz ${tempcopy}/repo/ "${user}@${server}:${dest}/repo/"
# finally, remove the backup on svnserver to free up some space
rm -rf ${tempcopy}/repo
Recent comments
6 weeks 6 days ago
6 weeks 6 days ago
7 weeks 3 days ago
14 weeks 3 days ago
14 weeks 3 days ago