ssh-keygen and ssh-copy-id to backup server
if ssh key fails when using duplicity with an error like "BackendException: ssh connection to user@hostname:22 failed: not a valid RSA private key file", it may be because it (your private key) is in OPENSSH format - in that case, convert it to standard PEM using:
ssh-keygen -p -f id_rsa -m pem -P "" -N ""
duplcity backup-source/ scp://user@host//path/to/backup/
and supply a key
If backup is super slow, use sftp instead of scp command:
duplcity backup-source/ sftp://user@host//path/to/backup/
gpg2 --full-gen-key
Use default RSA/RSA Key length 4096b No expiry
Real name: (company/person/computer name) Email: vman81@gmail.com No comment Okay
Use key id to start backup:
duplicity /path/to/backup/ sftp://user@host//path/to/backup/location/ --encrypt-key DEADBEEF01234567 --asynchronous-upload --max-blocksize=2097152
Next backup will automatically be incremental.
To restore:
duplicity sftp://user@host//path/to/backup/location/ /path/to/restore/
... and enter key password
TODO Check http://danielhnyk.cz/backup-with-duplicity/