adding a script for archiving our trac repository.
authorChris Koeritz <fred@gruntose.com>
Fri, 30 Sep 2016 16:44:31 +0000 (12:44 -0400)
committerChris Koeritz <fred@gruntose.com>
Fri, 30 Sep 2016 16:44:31 +0000 (12:44 -0400)
scripts/archival/backup_trac.sh [new file with mode: 0755]

diff --git a/scripts/archival/backup_trac.sh b/scripts/archival/backup_trac.sh
new file mode 100755 (executable)
index 0000000..950c7c9
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# backs up our trac repository.
+
+trac_path="$1"; shift
+
+if [ -z "$trac_path" ]; then
+  echo This script needs the path to the trac database.
+  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
+
+