views:

1470

answers:

4

I have a svn repo on my machine. 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.

OS: Windows

A: 

Considering this sort of thing would be trivial under *nix can we presume you are using windows?

Also is there a reason why you are running SVN locally rather than a machine on the network on a machine that is part of a proper backup strategy?

EDIT: I've retagged to reflect the environment better, thanks for the clarification.

sparkes
+3  A: 

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

Try this.

Jedi Master Spooky
+4  A: 

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.

BCS
+3  A: 

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.

jonezy