On Aug 18, 2007, at 13:31, Adrian Marsh wrote:
> As I fight svnsync (see other posts), I thought I'd better check that
> I'm actually going the right way about things to create a backup of
> all
> my SVN repo's.
>
> I used to use SMB mounts, and hotcopy the repos from one machine
> (linux)
> to a backup machine (w3k, with tape backup).
>
> As our repos have grown larger and larger, the time taken to run has
> increased to around 8 hours+, and of course I have to remove the
> backup
> first, then run hotcopy again, recreating everything, increasing my
> tape
> backups unnecessarily.
>
> So I now use svnsync to create backups. I do this with a script
> (below).
>
> I use "svn info" to dump a copy of the "info" from the original
> repos to
> a text file.
> I do this, because as I understand it, I'll need the UUID to
> restore the
> original system.
>
> What I don't know though - is how I'd actually go about actually
> restoring the original database (if needed). Would I just copy the
> files over, and then update the UUID somehow?
The method for updating the UUID is described in this document:
http://svn.collab.net/repos/svn/trunk/notes/svnsync.txt
> There are various variables, as the script is iterated for multiple
> Repos. But basically:
>
> - Check for local repos, if not there then create the dir, then the
> local repos, then init it to svnsync, then sync it. Scripts are
> put in
> a Scheduled Task.
>
>
> set THISREPO=%1
> if exist %DIR%\%SERV%\%THISREPO%\*.* goto update
>
> :create
> echo %DATE% %TIME% Creating local %THISREPO%
>> %LOGDIR%\%SERV%\log_%THISREPO%.log
> mkdir %DIR%\%SERV%
> cd /D %DIR%\%SERV%
> svnadmin create %THISREPO%
> svn info %newurl%/%THISREPO% > svninfo_%THISREPO%.txt
> copy %hook% %DIR%\%SERV%\%THISREPO%\hooks
> svnsync init file:///%DIRunix%/%SERV%/%THISREPO% %newurl%/%THISREPO
> % >>
> %LOGDIR%\%SERV%\log_%THISREPO%.log 2>&1
> echo %DATE% %TIME% Initial %THISREPO% init: %ERRORLEVEL% >>
> %LOGDIR%\%SERV%\log_%THISREPO%.log
>
> :update
> echo %DATE% %TIME% Start >>%LOGDIR%\%SERV%\log_%THISREPO%.log
>
> svnsync sync file:///%DIRunix%/%SERV%/%THISREPO% >>
> %LOGDIR%\%SERV%\log_%THISREPO%.log 2>&1
>
> echo %DATE% %TIME% Stop >>%LOGDIR%\%SERV%\log_%THISREPO%.log
>
>
> rem pause
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Aug 18 21:37:22 2007