Wednesday
Sep202006
Windows SVN Repo Backup Script
Wednesday, September 20, 2006 at 08:13PM
Heres a simple windwos svn repo backup script i wrote. It makes a safe copy of three different svn repos i had. Each repository is backed up to a folder which has a date prefix and is located in the path specified by BACKUP_FOLDER.
REM —————————————————+
REM |SVN REPO BACKUP BATCH FILE |
REM |Created 9/20/06 - Blake Robertson|
REM —————————————————+
SET DEST_PATH=”%BACKUP_FOLDER%\%DATE_STR%_docs_svn_repo”
svnadmin hotcopy DOCS_REPO DEST_PATH
REM |SVN REPO BACKUP BATCH FILE |
REM |Created 9/20/06 - Blake Robertson|
REM —————————————————+
SET DATE_STR=%Date:/=%
SET BACKUP_FOLDER=R:\svn_backups
SET MIDDLEWARE_REPO=R:\svn_repo1
SET FW_REPO=R:\svn_repo2
SET DOCS_REPO=R:\svn_repo3
echo ——[ Middleware Backup ]————
SET DEST_PATH=”%BACKUP_FOLDER%\%DATE_STR%_middleware-svn_repo”
svnadmin hotcopy MIDDLEWARE_REPO DEST_PATH
echo ——[ Firmware Backup ]————
SET DEST_PATH=”%BACKUP_FOLDER%\%DATE_STR%_firmware_svn_repo”
svnadmin hotcopy FW_REPO DEST_PATH
SET DEST_PATH=”%BACKUP_FOLDER%\%DATE_STR%_docs_svn_repo”
svnadmin hotcopy DOCS_REPO DEST_PATH
Reader Comments