In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Svn backups are generally done in three ways:
1) svnadmin dump
2) svnadmin hotcopy
3) svnsync.
Note that svn backup should not use the normal file copy method (unless you pause the library when backing up), such as copy command, rsync command.
The author has used the rsync command to do incremental and full backups. In the quarterly backup inspection audit, it is found that most of the backed-up libraries are not available, so it is best to use the functions provided by svn itself for backup.
Analysis of advantages and disadvantages
=
The first svnadmin dump is an officially recommended backup method, which has the advantage of being flexible, including full backup or incremental backup, and provides a version recovery mechanism.
The disadvantages are: if the version is relatively large, such as the number of versions increases to tens of thousands or hundreds of thousands, then the process of dump will be very slow; backup is time-consuming, recovery is more time-consuming, and is not conducive to rapid disaster recovery.
Personally, it is recommended to use this backup method when the number of versions is relatively small.
The second kind of svnadmin hotcopy is not designed for backup, it can only be copied in full, not incremental backup.
The advantage is: the backup process is fast, disaster recovery is also fast; if the backup machine has set up a svn service, or even do not need to restore, you only need to make a simple configuration to switch to the backup library to work.
The disadvantage is: more consumption of hard disk, need to have larger hard disk support (my backup machine has 1TB space, hehe).
The third kind of svnsync actually makes two mirror libraries, which can be quickly switched to the other when one is broken. However, this feature must be above the svn1.4 version.
The advantage is that it plays the role of dual-computer real-time backup when two mirror libraries are made.
The disadvantage is: when used as two mirror libraries, there is no way to "want to completely abandon today's changes and restore to the way they were last night"; and when it is used as an ordinary backup mechanism, the operation is more troublesome than the first two methods.
#! / usr/bin/perl-w
My $svn_repos= "/ opt/svn/repos"
My $backup_dir= "/ opt/backup/svn/"
My $next_backup_file = "weekly_fully_backup." .`date +% Y% m% d`
$youngest= `svnlook youngest $svn_ repos`
Chomp $youngest
Print "Backing up to revision $youngest\ n"
My $svnadmin_cmd= "svnadmin dump-- revision 0:$youngest $svn_repos > $backup_dir/$next_backup_file"
`$ svnadmin_ cmd`
Open (LOG, "> $backup_dir/last_backed_up"); # record the version number of the backup
Print LOG $youngest
Close LOG
# if you want to save space, execute the following compression script
Print "Compressing dump file...\ n"
Print `gzip-g $backup_dir/$next_backup_ file`
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.