Rem SVN version database backup script
Echo off
The REM subversion installation directory is set according to the actual svnclient installation directory.
Set svn_home = "D: \ Program Files \ svnclient"
The parent directory of all versions of REM is set according to the directory of the actual version library.
Set svn_root = "E: \ svnroot \ repository"
The Directory of the REM backup is set according to the target directory of the actual backup.
Set backup_svn_root = E: \ svnrootback
Set backup_directory = % backup_svn_root % \ % Date :~ 0, 10%
If exist % backup_directory % goto checkback
Echo create Backup Directory % backup_directory %> % svn_root %/backup. Log
Mkdir % backup_directory %
Rem verifies whether the directory is a version library. If yes, the name backup is taken out.
For/R % svn_root % I in (.) Do @ if exist "% I \ conf \ svnserve. conf" % svn_root % \ simplebackup. Bat "% ~ Fi "% ~ Ni
Goto end
: Checkback
Echo Backup Directory % backup_directory % already exists. Please clear it.
Goto end
: End
Rem simplebackup. Bat script content
@ ECHO is backing up version library % 1 ......
@ % Svn_home % \ bin \ svnadmin hotcopy % 1% backup_directory % \ % 2
@ Echo version library % 1 successfully backed up to % 2!