Penguin, small TECH.BARWICK.DE
Development
 

Recent posts

Categories

Archive

Syndication

 



Powered By

Info

2009-09-17 06:32:00

SVN repository backup

A quick shell script to make an atomic copy of a Subversion repository using svn hotcopy:

#!/bin/bash SVNDIR=/home/svn/ BACKUPDIR=/tmp/svn.`date +%Y-%m-%d`/ BACKUPFILE=/tmp/svn.`date +%Y-%m-%d`.tgz mkdir $BACKUPDIR svnadmin hotcopy $SVNDIR $BACKUPDIR tar -C $BACKUPDIR -czf $BACKUPFILE . scp $BACKUPFILE someuser@somewhere.example.com:svnbackup/ \ && rm $BACKUPFILE && rm -rf $BACKUPDIR

Posted at 2009-09-17 06:32:00 |Comments (0)