Script for Subversion hotcopy

REM Backup the Subversion repositories.

REM 'repo' is the working copy parent path.
SET repo="J:\repository"

REM 'backup' is the path to the backup folder.
SET backup="C:\SVN\Backup"

REM 'old' is a backup of the last backup in case the script fails.
SET old="C:\SVN\Old"

REM 'hotcopy' needs empty directories to copy into.
RMDIR /s /q %old%
REN %backup% Old
MKDIR %backup%

svnadmin hotcopy %repo% %backup% --clean-logs

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s