Correction : {host,local,remote}/ : duplicity + MySQL.
[lhc/ateliers.git] / local / backup / duplicity
1 #!/bin/sh -eu
2 # SYNTAX: $duplicity_options
3 ${TRACE:+set -x}
4
5 while IFS=: read -r type trust size algo keyid date x x x x x cap x
6 do case $type,$cap in
7 (sub,e) encrypt_key=${keyid#????????};;
8 (sub,s) sign_key=$keyid;;
9 esac done <<-EOF
10 $(gpg --list-public-keys --with-colons \
11 -- "backup+$(hostname)@$(domainname)")
12 EOF
13
14 /usr/bin/duplicity \
15 --archive-dir ~backup/archive \
16 --gpg-options --trusted-key="$sign_key" \
17 --encrypt-key "$encrypt_key" \
18 --sign-key "${sign_key#????????}" \
19 --use-agent \
20 -vw ${TRACE:+--verbosity info} \
21 "$@"