SVN source code library backup script

Source: Internet
Author: User
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!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.