Last active
December 18, 2015 02:59
-
-
Save justnom/5714870 to your computer and use it in GitHub Desktop.
Dump and compress a remote SVN repository. For SVN servers with version < 1.7.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Add in your url/paths | |
SET REPO_URL=svn://mysvnhost.com/repo/ | |
SET REPO_PATH=D:\repo_backup\ | |
SET REPO_DUMP_FILE=D:\repo_backup.dump | |
SET REPO_DUMP_FILE_ARCHIVE=%date:~-4,4%%date:~-7,2%%date:~0,2%dump.7z | |
SET REPO_PATH_NUX=file:///D:/repo_backup/ | |
del %REPO_DUMP_FILE% | |
rmdir %REPO_PATH% /s/q | |
mkdir %REPO_PATH% | |
svnadmin create %REPO_PATH% | |
echo > %REPO_PATH%\hooks\pre-revprop-change.cmd | |
svnsync init %REPO_PATH_NUX% %REPO_URL% | |
svnsync sync %REPO_PATH_NUX% | |
svnadmin dump %REPO_PATH% > %REPO_DUMP_FILE% | |
7z a -t7z %REPO_DUMP_FILE_ARCHIVE% %REPO_DUMP_FILE% | |
del %REPO_DUMP_FILE% | |
rmdir %REPO_PATH% /s/q |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment