How do I back up a remote SVN repository

Just use the svnsync command.

First, create a fresh repository on your home machine.

svnadmin create c:\backuprepo

Or on Unix:

svnadmin create ./backuprepo

Next, create a file named pre-revprop-change.bat:

echo exit 0 > c:\backuprepo\hooks\pre-revprop-change.bat

Or on Unix:

echo -ne '#!/bin/sh\nexit 0' > ./backuprepo/hooks/pre-revprop-change
chmod ugo+x ./backuprepo/hooks/pre-revprop-change 

then, initialize the sync:

svnsync init file:///c:/backuprepo https://url/of/your/repository

Or on Unix:

svnsync init file:///Volumes/volumelabel/backuprepo https://url/of/your/repository

After that, you can simply run

svnsync sync file:///c:/backuprepo

once a day or so, and you’ll get only those changes which are not yet in your backup repository. The first time it will take a while, but after you’ve synchronized your backup repository with the real one, it will only take a few seconds to sync it because only those revisions that are new need to be synched.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)