Correction : {host,local,remote}/ : duplicity + MySQL.
[lhc/ateliers.git] / local / backup / duplicity-remove
1 #!/bin/sh -eu
2 # SYNTAX: $data_dir $find_options -- $duplicity_options
3 ${TRACE:+set -x}
4
5 test "$(id -u)" = "$(id -u backup)"
6
7 data_dir=$1; shift
8 find_options=
9 while [ $# -gt 0 ]
10 do case $1 in
11 (--) shift; break;;
12 (*) find_options="$find_options $1"; shift;;
13 esac
14 done
15
16 find ~backup/data/"$data_dir" -mindepth 1 $find_options -type d \
17 -printf '--name\0%P\0file://%p\0' |
18 xargs -0rn3 ${TRACE:+-t} ~backup/bin/duplicity "$@"