Thursday, September 3, 2015

copy of an svn hotcopy

after your nightly svn hotcopy issue an rsync to plop data someplace else quick fast.
 #!/bin/bash  
   
 repos=( repo1 repo2 repo3 )  
 opath=/tmp/svn  
 dpath=/backup/svn  
 suffix=$(date +%Y-%m-%d)  
 options= --verbose -c --update --recursive --ignore-existing --delete --exclude lost+found --perms --owner --group --times  
   
 for (( i = 0 ; i < ${#repos[@]} ; i++ ))  
 do  
   
 rsync $options user@svnserver:${opath}/${repos[$i]}_$suffix.hotcopy/ $dpath/${repos[$i]}  
   
 done  

No comments: