[Solved] s3 Backup With Duplicity Errors
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.
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 )