diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-11-23 20:47:40 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-11-23 20:47:40 +0100 |
commit | 0c52c7e2b604f15c67a0ae127704e7c4d5848a1b (patch) | |
tree | ca9872a6a273d5b0319aba4fc5f3552093b1a21d | |
parent | ba27cb3fc21baa6f64221612517faa77811f9a20 (diff) |
Add backupfiles.sh script (only zelfoverhoor now)
-rwxr-xr-x | backupfiles.sh | 6 |
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 |