2 # this handler will backup trac environments (based on the svn handler)
4 # http://trac.edgewall.com/
7 getconf src /var/lib/trac
8 getconf dest /var/backups/trac
9 getconf tmp /var/backups/trac.tmp
13 for repo in `find . -name VERSION`
17 # Just make the $tmp dir, not $tmp/$repo
18 ret=`mkdir -p $tmp 2>&1`
23 if [ $code != 0 ]; then
24 error "command failed mkdir -p $tmp"
27 ret=`trac-admin $src/$repo hotcopy $tmp/$repo 2>&1`
32 if [ $code != 0 ]; then
33 error "command failed -- trac-admin $src/$repo hotcopy $tmp/$repo"
38 if [ $error -eq 1 ]; then
39 echo "Error: because of earlier errors, we are leaving trac backups in $tmp instead of $dest"
41 if [ -d $dest -a -d $tmp ]; then