Duplicity cron configuration

view full story

http://stackoverflow.com – I've stumbled upon an issue when I tried to automate backups via duplicity: duplicity can't scp while running in my bash script, as strange as that sounds. I tried specifying path to the private key file in at least 15 ways, I tried messing with ssh-agent and ssh-add from within the script, no dice. Running as root, this is my script: #!/bin/bash export PASSPHRASE='password' duplicity --exclude /sys --exclude /mnt --exclude /tmp --exclude /proc / scp://[email protected]/$HOSTNAME duplicity remove-older-than 6M --force scp://[email protected]/$HOSTNAME unset PASSPHRASE These commands work fla (HowTos)