blob: aeea10b0e4ff31f95e427c57b2284b0c0d9a4736 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh -euf
usage() (
echo "backup-all.sh <dataset list> [duplicity options]"
echo
echo "Backups each dataset listed in the given file using Duplicity,"
echo "each line of the file being a pair of a dataset name and a Duplicity destination URI."
echo
)
backup_all() (
LIST_FILE="$1"
DUPLICITY_OPTIONS="$2"
while read -r LINE; do
backup-dataset.sh $LINE $DUPLICITY_OPTIONS
done <"$LIST_FILE"
)
case "${1:-help}" in
"help") usage;;
*) backup_all "$1" "${2:-}";;
esac
|