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