summaryrefslogtreecommitdiff
path: root/backup-all.sh
diff options
context:
space:
mode:
authorroot2017-05-17 04:06:27 +0200
committerroot2017-05-17 04:06:27 +0200
commit5bdbcea22a55979bcd4aa21aa4f76c9b818e1511 (patch)
tree06ab275a2bf501768b0bdf4a9f843c4b2c1c3bd0 /backup-all.sh
parent118ff790598aebf3c3f11a2ed73f0c842ae83e9c (diff)
downloadserver-utilities-5bdbcea22a55979bcd4aa21aa4f76c9b818e1511.tar.gz
Add backup scripts
Diffstat (limited to 'backup-all.sh')
-rwxr-xr-xbackup-all.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/backup-all.sh b/backup-all.sh
new file mode 100755
index 0000000..aeea10b
--- /dev/null
+++ b/backup-all.sh
@@ -0,0 +1,24 @@
1#!/bin/sh -euf
2
3usage() (
4 echo "backup-all.sh <dataset list> [duplicity options]"
5 echo
6 echo "Backups each dataset listed in the given file using Duplicity,"
7 echo "each line of the file being a pair of a dataset name and a Duplicity destination URI."
8 echo
9)
10
11backup_all() (
12 LIST_FILE="$1"
13 DUPLICITY_OPTIONS="$2"
14
15 while read -r LINE; do
16 backup-dataset.sh $LINE $DUPLICITY_OPTIONS
17 done <"$LIST_FILE"
18)
19
20case "${1:-help}" in
21 "help") usage;;
22 *) backup_all "$1" "${2:-}";;
23esac
24