X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Farchival%2Fbackup_trac.sh;h=e1588121a7dde4d606e29776f5335e80ea2e23d5;hb=4f2922289d9e6f33ec81a09643c32ece76b57231;hp=950c7c9b84e23e852e76566cca956f44a6b1a546;hpb=8fb860c4200e4a59eee541b10ceb6ff3570ac175;p=feisty_meow.git diff --git a/scripts/archival/backup_trac.sh b/scripts/archival/backup_trac.sh index 950c7c9b..e1588121 100755 --- a/scripts/archival/backup_trac.sh +++ b/scripts/archival/backup_trac.sh @@ -3,14 +3,16 @@ # backs up our trac repository. trac_path="$1"; shift +archive_path="$1"; shift -if [ -z "$trac_path" ]; then - echo This script needs the path to the trac database. +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 /z/stuffing/archives/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 +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