1.dump备份方式:
svnadmin dump /data/svn/xxxx > /data/beifen/`date +/%Y%m%d`.bak
xxxx:项目名称(项目库)
将xxxx这个项目备份到/data/beifen/
2.load恢复方式:
svnadmin load /data/svn/ceshi < /data/20150906
将备份的20150906这个svn备份库恢复到项目ceshi上面
3.自动全量备份脚本
# vim svn.pl
#!/usr/bin/perl -w
my $svn_repos="/data/svn/project";
my $backup_dir="/data/backup/svn/";
my $next_backup_file = "svn".`date +%Y%m%d`;
$youngest=`svnlook youngest $svn_repos`;
chomp $youngest;
print "Backing up to revision $youngest";
my $svnadmin_cmd="svnadmin dump --revision $youngest $svn_repos >$backup_dir/$next_backup_file";
`$svnadmin_cmd`;
open(LOG,">$backup_dir/last_backed_up"); #记录备份的版本号
print LOG $youngest;
close LOG;
#如果想节约空间,则再执行下面的压缩脚本
#print "Compressing dump file...n";
#print `gzip -9 $backup_dir/$next_backup_file`;
删除三天前的备份文件
# vim svn-Timing-delete.sh
find /data/backup/svn/ -type f -mtime +3 -exec rm '{}' ;
添加到计划任务
# crontab -e
30 22 * * * perl /data/svn/svn.pl
00 23 * * * bash /data/svn/svn-Timing-delete.sh
windows上面备份还原
https://blog.csdn.net/qq_29307291/article/details/74990226