Do duplicity backup

Headline for duplicity

Install duplicity and configure ssh keys

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 ""

do backup

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/

GPG key gen

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

Start backup using gpg key and restore

Use key id to start backup:

duplicity /path/to/backup/ sftp://user@host//path/to/backup/location/ --encrypt-key DEADBEEF01234567

Next backup will automatically be incremental.

To restore:

duplicity sftp://user@host//path/to/backup/location/ /path/to/restore/ 

... and enter key password

Describe GPG key backup

TODO Check http://danielhnyk.cz/backup-with-duplicity/