Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Script to backup svn repository to network share

Tags:

svn

I have a svn repo on my machine (Windows). Anyone have a script to back it up to a network share?

I'm using the repo locally since I'm disconnected a lot. The network share is on a server with a backup strategy. I'm a perfect candidate for git/hg but I don't want to give up my VS integration just yet.

like image 939
Dane O'Connor Avatar asked Aug 21 '08 16:08

Dane O'Connor


3 Answers

svnadmin dump C:\SVNRepositorio\Repositorio > \Backups\BkTmpSubversion\subversiontemp.dump

ditto Spooky's reply ^^

On linux you might try adding "| gzip" in the middle

also take a look at the --incremental & --deltas flags


sparkes: For some values of "My machine" that won't be local.

Also If you are using SVN for non commercial reasons (I have all my homework from collage checked into a SVN) you might not have a backup system.

like image 62
BCS Avatar answered Nov 09 '22 05:11

BCS


I wrote a batch file to do this for a bunch of repos, you could just hook that batch file up to windows scheduler and run it on a schedule.

svnadmin hotcopy m:\Source\Q4Press\Repo m:\SvnOut\Q4Press

I use the hotcopy but the svn dump would work just as well.

like image 35
jonezy Avatar answered Nov 09 '22 07:11

jonezy


svnadmin dump C:\SVNRepositorio\Repositorio > \\Backups\BkTmpSubversion\subversiontemp.dump

Try this.

like image 3
Jedi Master Spooky Avatar answered Nov 09 '22 07:11

Jedi Master Spooky