Automatic backups with Subversion

15 April 2007 | Matt Perdeaux |

Just thought I would quickly share a pretty powerful way of backing up subversion repositories.

Basically, it involves a Windows batch file:

@ECHO OFF
set vcReposRoot={svn repository root}
set vcDumpRoot={location of backup directory}

cd /d %vcReposRoot%
for /d %%a in (*) do (
  svnadmin dump %vcReposRoot%\%%a > %vcDumpRoot%\%%a.dmp
)

The script loops through all our repositories and does an svnadmin dump command for each of them, which writes a recoverable dump file to a network drive. We then schedule the batch file to run nightly.


Add a comment

  Your name is required.
  Your email address is required.
        

  Please enter the answer in figures (type 12 NOT twelve).
 
  NB - We will not publish or disclose your email address to third parties. We require it so we can check you're not a nasty spambot, and so we can display your Gravatar if you have one. Apologies for the little arithmetic test, but we've been having terrible trouble with comment spam.

Matt's latest tweets

Loading...

Latest blog entries

Blog archive

Categories


www.associativetrails.com