Unable to backup to European Amazon S3 bucket

Asked by Martin Fisher

Hello!

I am testing Duplicity with the intention of using it for some large backups to Amazon S3. My preference is to use European (Frankfurt) buckets rather than US Standard. If I do a test with

export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
duplicity --no-encryption /home/martin/Desktop/backup-this s3+http://testing.backup.usstandard

The backup runs fine to the pre-created US Standard bucket. But if I test with

export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
duplicity --no-encryption --s3-use-new-style --s3-european-buckets /home/martin/Desktop/backup-this s3+http://testing.backup.frankfurt

to the pre-created EU Frankfurt bucket I receive this output:

Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1525, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1519, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1357, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1103, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 994, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 223, in get_backend
    obj = get_backend_object(url_string)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 209, in get_backend_object
    return factory(pu)
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/_boto_single.py", line 161, in __init__
    self.resetConnection()
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/_boto_single.py", line 187, in resetConnection
    if "NoSuchBucket" in e.error_code:
AttributeError: 'CertificateError' object has no attribute 'error_code'

I am running Duplicity on Ubuntu 15.10 and have added the ppa for both Duplicity and python-boto so that I have the latest versions (0.7.05 and 2.34, respectively).

If anybody could advise me, I would be grateful.

Thank you, Martin

Question information

Language:
English Edit question
Status:
Solved
For:
Duplicity Edit question
Assignee:
No assignee Edit question
Solved by:
Martin Fisher
Solved:
Last query:
Last reply:
Revision history for this message
Martin Fisher (yusuf-martin) said :
#1

I am now going to answer my own question. Following some experimentation, I conclude that the EU bucket does not support accessing it with s3+http://

I checked the AWS S3 endpoints at http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region

and then tried

duplicity --no-encryption /home/martin/Desktop/backup-this s3://s3.eu-central-1.amazonaws.com/testing.backup.frankfurt

and it works fine.