1 # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
2 # vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
4 # this handler will backup trac environments (based on the svn handler)
6 # http://trac.edgewall.com/
9 getconf src /var/lib/trac
10 getconf dest /var/backups/trac
11 getconf tmp /var/backups/trac.tmp
14 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