svnクロスマシンバックアップ
2315 ワード
#!/bin/sh
svn_bak_dir='/svndata/cloudil'
svn_server='svn://172.16.40.200:9999'
user=adminread
pass=adminread123
mkdir -p $svn_bak_dir
/usr/bin/svnadmin create $svn_bak_dir
touch $svn_bak_dir/hooks/pre-revprop-change
echo "#!/bin/sh" >> $svn_bak_dir/hooks/pre-revprop-change
echo "exit 0" >> $svn_bak_dir/hooks/pre-revprop-change
chmod a+x $svn_bak_dir/hooks/pre-revprop-change
svnsync init file://$svn_bak_dir $svn_server --username $user --password $pass
svnsync sync file://$svn_bak_dir --username $user --password $pass
echo "end"
echo "Please start svndata"