X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Farchival%2Fbackup_trac.sh;h=f96e5ae5acbf4cd868a13f45dd82c231a47bd80d;hb=9ef25e4dcbd9cfee61bf1d3b54e85aa006a2a42e;hp=e1588121a7dde4d606e29776f5335e80ea2e23d5;hpb=eacaa71f0f5cf263d1f428683751c475593747f5;p=feisty_meow.git diff --git a/scripts/archival/backup_trac.sh b/scripts/archival/backup_trac.sh index e1588121..f96e5ae5 100755 --- a/scripts/archival/backup_trac.sh +++ b/scripts/archival/backup_trac.sh @@ -1,18 +1,13 @@ #!/bin/bash -# backs up our trac repository. +# backs up a trac repository into a tar.gz file. + +export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory. trac_path="$1"; shift archive_path="$1"; shift -if [ -z "$trac_path" -o -z "$archive_path" ]; then - echo This script needs the path to the trac database as the first parameter - echo and the path to the storage directory as the second parameter. - exit 1 -fi - -sep='_' - -tar -czf "${archive_path}/trac_bkup_$(date +"%Y$sep%m$sep%d$sep%H%M$sep%S" | tr -d '/\n/').tar.gz" "$trac_path" &>$TMP/zz_backup_trac.log +# call our arbitrary backer upper, since this is a simple single directory case. +bash $WORKDIR/backup_arbitrary.sh "$trac_path" "$archive_path" "trac_bkup"