#!/bin/bash
#svn全量备份脚本
wwytcode_path=/home/wwytcode/project
backup_path=/home/bak
Date=`date +%Y%m%d`
cd $backup_path
echo `date` >> $back_path/svn_backup.log
svnversion=`svnlook youngest $wwytcode_path`
svnadmin dump --revision 0:$svnversion $wwytcode_path > $backup_path/wwytfull.$Date
if [ $? -eq 0 ];
then
echo "wwytcode Full amount of backup success" >> $backup_path/svn_backup.log
else
echo "wwytcode Full amount of backup failed" >> $backup_path/svn_backup.log
fi
echo $svnversion > $backup_path/youngest_revision
#!/bin/bash
#svn增量备份脚本
wwytcode_path=/home/wwytcode/project
backup_path=/home/bak
Date=`date +%Y%m%d`
cd $backup_path
echo `date` >> $back_path/svn_backup.log
svnversion=`svnlook youngest $wwytcode_path`
svnadmin dump --revision 0:$svnversion $wwytcode_path > $backup_path/wwytfull.$Date
if [ $? -eq 0 ];
then
echo "wwytcode Full amount of backup success" >> $backup_path/svn_backup.log
else
echo "wwytcode Full amount of backup failed" >> $backup_path/svn_backup.log
fi
echo $svnversion > $backup_path/youngest_revision