From b11fdd1305aa42bab8648bfae7c329eb49efbce9 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Fri, 30 Sep 2016 12:56:47 -0400 Subject: [PATCH] updated to support a path for the archive locatin. --- infobase/configuration/cron/backup_trac.crontab | 2 +- scripts/archival/backup_trac.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/infobase/configuration/cron/backup_trac.crontab b/infobase/configuration/cron/backup_trac.crontab index 9f1f9450..c7967aab 100644 --- a/infobase/configuration/cron/backup_trac.crontab +++ b/infobase/configuration/cron/backup_trac.crontab @@ -2,7 +2,7 @@ # backs up trac every week. -28 7 * * 2 bash $HOME/feisty_meow/scripts/archival/backup_trac.sh /home/trac +28 7 * * 2 bash $HOME/feisty_meow/scripts/archival/backup_trac.sh /home/trac /z/stuffing/archives diff --git a/scripts/archival/backup_trac.sh b/scripts/archival/backup_trac.sh index 950c7c9b..43efc652 100755 --- a/scripts/archival/backup_trac.sh +++ b/scripts/archival/backup_trac.sh @@ -3,9 +3,11 @@ # 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 -- 2.34.1