Dumping a svn is so easy... I made a windows batch:
@echo off
call :svndump %DATE:~0,10% reponame
goto :EOF
:svndump
setlocal
echo [%1%] >> log_backup.txt
echo %TIME% dumping [%2%] start >> log_backup.txt
if not exist %1 mkdir %1
"svnadmin.exe" dump Path\To\Svnrep\%2 > %1\%2.dmp
echo dump success, start compressing... >> log_backup.txt
"7z.exe" a %1\%2.dmp.7z %1\%2.dmp
del /F %1\%2.dmp >> log_backup.txt
echo %TIME% dumping [%2%] finished >> log_backup.txt
echo. >> log_backup.txt
endlocal
goto :EOF
Windows batch... have to work with windows...Batch is not bad with basic flow control and "mimiced" function call, anyway. After equipped with Gnuwin32.
0 comments:
Post a Comment