实现其功能蛮简单,主要是用了svnadmin hotcopy,这东东功能很强大,我经常用于svn的版本库的转移(顺便说一句,上次不小心误操作将库删光了,很轻松的用svnadmin hotcopy将其恢复过来了)。
for PROJECT in test project svntest
do
cd ${SVNDIR}
${SVNADMIN} hotcopy ${PROJECT} ${BACKDIR}/${DATE}/${PROJECT} --clean-logs
cd ${BACKDIR}/${DATE}
tar zcvf ${PROJECT}_svn_${DATE}.tar.gz ${PROJECT} > /dev/null
rm -rf ${PROJECT}
echo "Repository: ${PROJECT} backup done into ${BACKDIR}/${DATE}/ Successful!"
>> ${LogFile}
/bin/sleep 2
done
2016-11-16
SVN的版本库的批量备份
评论
发表评论
姓 名: