Internal SVN file Server backup policy built into the company

Source: Internet
Author: User



SVN backup strategy

1, full backup (test phase performed daily)

SVN folder Backup and SVN dump file backup


The first step:

On the 192.168.8.11 server


Execute the C:\SVN backup script \svnw.bat script first. The contents are as follows:

Svnadmin hotcopy C:\Repositories\svn\project c:/svnback/project1-%date:~0,4%-%date:~5,2%-%date:~8,2%


Note: This line of code means to use Svnadmin to back up all the files in the repository to this path, c:/svnback/named project1+ Day system time


Step Two:

Then execute the C:\SVN backup script \svndump.bat script. The contents are as follows:

Svnadmin Dump C:\Repositories\svn\project > c:\svnback\project1-%date:~0,4%-%date:~5,2%-%date:~8,2%\ Project.dump

Note: This line of script means to generate a dump backup file with Svnadmin, the backup path to project under C:\svnback\, which is the directory that was last built according to the system time.


Step Three:

Execute the C:\SVN backup script \yasuo.bat script first. The contents are as follows

C:

cd/

CD C:/Program Files/winrar

WinRAR a-ep1-o+-povicnet-inul-r-ibck c:\svnback\project1-%date:~0,4%-%date:~5,2%-%date:~8,2%.rar C:/svnback



Note: This line of script means to use the WinRAR path to C:\svnback\ when the week folder compression, stored in the current C:\svnback\ path. Encryption is set up to ensure data security.



Scheduled tasks: (test phase performed daily)

Settings: C:\svn backup script \svnw.bat execution time every night 22:00


C:\SVN backup script \svndump.bat execution time every night 22:30


C:\SVN backup script \yasuo.bat execution time every night 23:00


-----------------------------------Perfect Split Line-------------------------------------------

Command explanation:

Processing command (Rar.bat):

C:
cd/
CD C:/Program Files/winrar
WinRAR a -ep1-o+-Ppassword -inul-r-ibck c:/rarfile e:/bigfile


Where a is the compression command,-ep1-o+-P -inul-r-ibck is the parameter


EP1: Exclude the Base folder, or the package will contain the full path of the folder to be compressed

o+: Overwrite files that already exist

P: Password, the red part behind is the password, close to this parameter p, looks a bit strange

Inul: Suppress error messages

R: Along with subfolder operations

IBCK: Running in background mode

C:\RarFile Compressed Files

E:\BigFile source files waiting to be compressed


For more help, you can open winrar and watch it help.


You can periodically compress some file birds by writing the above batch command to a batch file and then running the batch file periodically with a scheduled task. For example, in the dead of night, the machine automatically compresses huge database backup files.


This article is from "Ghost" blog, please make sure to keep this source http://fangwei009.blog.51cto.com/5234706/1649613

Internal SVN file Server backup policy built into the company

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.