Linux system Environment SVN server scheduled backup detailed

Source: Internet
Author: User

Linux system Environment SVN server timed backup detailed:

This article focuses on how to regularly back up the SVN server under the Linux system, in order to prevent the SVN server data loss caused by the data loss, you need to set up the SVN server timing backup processing, in order to retrieve the lost data, as follows:

A. Create a new backup directory

#mkdir/opt/project_backup

Second, write backup scripts

#cd/HOME/SVN

#vim project_backup.sh

Cd/home/svn
now= '/bin/date +%y%m%d '
/bin/tar czvf "project_backup_$now.tar.gz" project/&& rm-rf/opt/project_backup/* &&/bin/mv project_ backup_*.tar.gz/opt/project_backup/
If [$? = = 0]
Then
result= "ok!!"
Else
result= "false!!"
Fi

Third, set the timing to execute the script

#crontab –e

Input content: 0 ***/home/svn/project_backup.sh

Note:

Represents 23 points per day of the night to perform this script backup

Iv. Simulation Execution

#./home/svn/project_backup.sh Enter

#cd/opt/project_backup

Results:

Mobile Internet Technology Group (i) 179914858

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Linux system Environment SVN server scheduled backup detailed

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.