summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-11-23 20:47:40 +0100
committertomsmeding <tom.smeding@gmail.com>2017-11-23 20:47:40 +0100
commit0c52c7e2b604f15c67a0ae127704e7c4d5848a1b (patch)
treeca9872a6a273d5b0319aba4fc5f3552093b1a21d
parentba27cb3fc21baa6f64221612517faa77811f9a20 (diff)
Add backupfiles.sh script (only zelfoverhoor now)
-rwxr-xr-xbackupfiles.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/backupfiles.sh b/backupfiles.sh
new file mode 100755
index 0000000..97d4860
--- /dev/null
+++ b/backupfiles.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+test "$(hostname)" = "tomsmeding.com" || { echo "Not on server...?"; exit 1; }
+cp --version >/dev/null 2>&1 || { echo "not GNU cp"; exit 1; }
+cd ~/webserver
+mkdir -p ../backups_webserver
+find modules/zelfoverhoor -type f -name '*.json' | grep -v 'accounts.json' | xargs cp -v -t ../backups_webserver