Skip to content
Snippets Groups Projects
Select Git revision
  • d1011cef819190bf23b11a2c681dc8dc9433fe28
  • master default protected
  • fix/dont_save_partition_table_of_mapper_devices
  • fix_11285
  • debian
  • pristine-tar
  • upstream
  • backupninja_debian/1.0.2-1
  • backupninja_upstream/1.0.2
  • backupninja-1.0.2
  • backupninja_debian/1.0.1-2
  • backupninja_debian/1.0.1-1
  • backupninja_upstream/1.0.1
  • backupninja-1.0.1
  • backupninja_debian/1.0-1
  • backupninja_upstream/1.0
  • backupninja-1.0
  • backupninja_debian/1.0_rc1-1
  • backupninja_upstream/1.0_rc1
  • backupninja-1.0-rc1
  • backupninja_debian/0.9.10-2
  • backupninja_debian/0.9.10-1
  • backupninja_upstream/0.9.10
  • backupninja-0.9.10
  • backupninja_debian/0.9.9-1
  • backupninja-0.9.9
  • backupninja-0.9.8.1
27 results

backup.d.5

Blame
  • Forked from Liberate / backupninja
    Source project has a limited visibility.
    trac.in 1.03 KiB
    # -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
    # vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
    #
    # this handler will backup trac environments (based on the svn handler)
    #
    # http://trac.edgewall.com/
    #
    
    getconf src /var/lib/trac
    getconf dest /var/backups/trac
    getconf tmp /var/backups/trac.tmp
    
    cd $src
    for repo in `find . -name VERSION`
    do
       repo=`dirname $repo`
       if [ "$repo" == "." ]
       then
          repo=""
       fi
    
       # Just make the parent directory for $tmp/$repo
       parentdir=`dirname $tmp/$repo`
       ret=`mkdir -p $parentdir 2>&1`
       code=$?
       if [ "$ret" ]; then
          debug "$ret"
       fi
       if [ $code != 0 ]; then
          error "command failed mkdir -p $parentdir"
       fi
    
       ret=`trac-admin $src/$repo hotcopy $tmp/$repo 2>&1`
       code=$?
       if [ "$ret" ]; then
          debug "$ret"
       fi
       if [ $code != 0 ]; then
          error "command failed -- trac-admin $src/$repo hotcopy $tmp/$repo"
       fi
    done
    
    if [ -d $dest -a -d $tmp ]; then
       rm -rf $dest
    fi
    if [ -d $tmp ]; then
       mv $tmp $dest
    fi
    
    exit 0
    
    # vim: filetype=sh