server-scripts/duplicity-backup
2014-10-19 17:27:33 +02:00

24 lines
808 B
Bash
Executable File

#!/bin/sh
## Remote backup script. Requires duplicity and gpg-agent with the keys and passphrases loaded as root.
## Uses separate encryption and signing keys
## Usage: 'backup_remote.sh'
enc_key=AF5834A6
sign_key=AF5834A6
src="/home"
#dest="scp://u93722@u93722.your-backup.de/duplicity"
dest="file:///mnt/backup/duplicity"
duplicity --gpg-options "--secret-keyring /data/duplicity/duplicity.sec --keyring /data/duplicity/duplicity.pub" \
--verbosity notice \
--encrypt-key "$enc_key" \
--sign-key "$sign_key" \
--full-if-older-than 60D \
--num-retries 3 \
--asynchronous-upload \
--volsize 250 \
--exclude-filelist-stdin \
--archive-dir /data/duplicity/cache \
--log-file /var/log/duplicity.log \
"$src" "$dest"