1 # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
3 # this handler will backup trac environments (based on the svn handler)
5 # http://trac.edgewall.com/
8 getconf src /var/lib/trac
9 getconf dest /var/backups/trac
10 getconf tmp /var/backups/trac.tmp
13 for repo in `find . -name VERSION`
22 # Just make the parent directory for $tmp/$repo
23 parentdir=`dirname $tmp/$repo`
24 ret=`mkdir -p $parentdir 2>&1`
29 if [ $code != 0 ]; then
30 error "command failed mkdir -p $parentdir"
33 ret=`trac-admin $src/$repo hotcopy $tmp/$repo 2>&1`
38 if [ $code != 0 ]; then
39 error "command failed -- trac-admin $src/$repo hotcopy $tmp/$repo"
43 if [ -d $dest -a -d $tmp ]; then