[Solved] s3 Backup With Duplicity Errors

I've been trying to set up automated backups using Duplicity with Amazon s3.

I've followed a few different tutorials, that all do basically the same thing, so I can't work out where my errors are coming from.

e.g.

http://www.randys.org/2007/11/16/how-to … duplicity/">http://www.randys.org/2007/11/16/how-to-automated-backups-to-amazon-s-s3-with-duplicity/

http://www.cenolan.com/2008/12/how-to-i … duplicity/">http://www.cenolan.com/2008/12/how-to-incremental-daily-backups-amazon-s3-duplicity/

http://blog.damontimm.com/how-to-automa … or-ubuntu/">http://blog.damontimm.com/how-to-automated-secure-encrypted-incremental-backups-amazon-s3-duplicity-os-x-or-ubuntu/

I've installed Duplicity and python-boto, and the secret keys are generated.

I got a lot of errors trying to execute some of the demo scripts in those sites, but this seems to work for now (Just trying to use any simple script that will work, can tune it later):

#!/bin/sh
export PASSPHRASE="My-passphrase"
export AWS_ACCESS_KEY_ID=my-amazon-access-key
export AWS_SECRET_ACCESS_KEY=my-amazon-secret-key
duplicity --encrypt-key=my-8digit-gpg-key --sign-key=my-8digit-gpg-key /srv/www/pliableweb.com/ s3+http://backup.pliableweb
export PASSPHRASE=
export AWS_ACCESS_KEY_ID= 
export AWS_SECRET_ACCESS_KEY=

When I run that though, I get a stream of errors:

Last full backup date: none
No signatures found, switching to full backup.
GPGError: GPG Failed, see log below:
===== Begin GnuPG log =====
gpg: no default secret key: bad passphrase
gpg: [stdin]: sign+encrypt failed: bad passphrase
===== End GnuPG log =====

close failed in file object destructor:
IOError: [Errno 32] Broken pipe
': not a valid identifierort: `

I'm guessing it can't find my key at all (The passphrase is definitely right, I've even remade the key to make sure I hadn't typed the phrase wrong in the initial setup).

Any ideas of what I should try next? Thanks for taking the time to read all this!

(Edit - Just incase some extra info helps; I'm running the script from the /srv/www/ directory, I'm using a non-root account with sudo (and the GPG key was generated in that account), and the file belongs to that account and has permisisons 700)

EDIT 2 - Incase anyone finds this thread in future with the same problem, came down to two things really:

1 - I used sudo to make the keys. Just use your account normally.

2 - I used SFTP to upload the shell scripts. Seems to have messed up the file formatting (took someone else to spot that though, not me. It looked identical in nano to me either way! xD )

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct