Backup svn
From Attie's Wiki
(Difference between revisions)
Line 13: | Line 13: | ||
$ svnsync sync --username attie file://<full_backup_path> | $ svnsync sync --username attie file://<full_backup_path> | ||
</pre> | </pre> | ||
− | < | + | <h2>A Setup Script</h2> |
Usage: | Usage: | ||
<pre> | <pre> |
Latest revision as of 15:43, 2 September 2010
see Google's Answer for more
To Setup
$ svnadmin create <backup_path> $ cd <backup_path> $ echo -e "#\0041/bin/bash\nexit 0" > hooks/pre-revprop-change $ chmod +x hooks/pre-revprop-change $ svnsync init --username attie file://`pwd` http://<live_svn_path> Copied properties for revision 0.
To Sync
$ svnsync sync --username attie file://<full_backup_path>
A Setup Script
Usage:
$ ./setupsvnsync backup http://svnserver/source username
Script:
#!/bin/bash echo -e "Backup Path:\t$1" echo -e "Source Path:\t$2" echo -e "Username:\t$3" echo read -p "*** Press any key if you are happy to continue... ***" echo svnadmin create $1 cd $1 echo -e "#\0041/bin/bash\nexit 0" > hooks/pre-revprop-change chmod +x hooks/pre-revprop-change svnsync init --username $3 file://`pwd` $2 echo echo -e "Backup Command:\tsvnsync sync --username $3 file://`pwd`" echo read -p "*** Press any key to run the initial sync, or press ^C to quit now... ***" svnsync sync --username $3 file://`pwd`