Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import of duplicity.backends.giobackend #63

Closed
janikvonrotz opened this issue Mar 14, 2014 · 3 comments
Closed

Import of duplicity.backends.giobackend #63

janikvonrotz opened this issue Mar 14, 2014 · 3 comments

Comments

@janikvonrotz
Copy link

I'll get this error when running the script.

Import of duplicity.backends.giobackend Failed: No module named gio

I'll use

  • duplicity 0.6.18
  • s3cmd version 1.0.0
  • gpg (GnuPG) 1.4.11
  • Ubuntu 12.04.4 LTS (GNU/Linux 3.2.0-60-virtual x86_64)

Running the "naked" duplicity command throws


Import of duplicity.backends.giobackend Failed: No module named gio
Traceback (most recent call last):
  File "/usr/bin/duplicity", line 1414, in <module>
    with_tempdir(main)
  File "/usr/bin/duplicity", line 1407, in with_tempdir
    fn()
  File "/usr/bin/duplicity", line 1258, in main
    action = commandline.ProcessCommandLine(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 1007, in ProcessCommandLine
    backup, local_pathname = set_backend(args[0], args[1])
  File "/usr/lib/python2.7/dist-packages/duplicity/commandline.py", line 900, in set_backend
    globals.backend = backend.get_backend(bend)
  File "/usr/lib/python2.7/dist-packages/duplicity/backend.py", line 158, in get_backend
    return _backends[pu.scheme](pu)
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/_boto_single.py", line 77, in __init__
    self.resetConnection()
  File "/usr/lib/python2.7/dist-packages/duplicity/backends/_boto_single.py", line 144, in resetConnection
    self.conn = S3Connection(is_secure=(not globals.s3_unencrypted_connection))
  File "/usr/lib/python2.7/dist-packages/boto/s3/connection.py", line 154, in __init__
    suppress_consec_slashes=suppress_consec_slashes)
  File "/usr/lib/python2.7/dist-packages/boto/connection.py", line 486, in __init__
    host, config, self.provider, self._required_auth_capability())
  File "/usr/lib/python2.7/dist-packages/boto/auth.py", line 406, in get_auth_handler
    'Check your credentials' % (len(names), str(names)))
NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials

What am I missing?

Here my configuration file:

#!/bin/bash

# AMAZON S3 INFORMATION
# Comment out these lines if you're not using Amazon S3
AWS_ACCESS_KEY_ID="asdf"
AWS_SECRET_ACCESS_KEY="asdf"

# S3CMD INFORMATION
# Most people don't need this, but in some cases
# you may want to specify a custom configuration file
# to pass to s3cmd. If so, set the S3CMD_CONF_FILE variable
# to the full path of this custom config file.
# Per default s3cmd uses ${HOME}/.s3cfg
# S3CMD_CONF_FILE='/path/to/your/s3cmd/conf/file'

ENCRYPTION='yes'

PASSPHRASE="asdf"

GPG_ENC_KEY="asdf"
GPG_SIGN_KEY="asdf"

ROOT="/var"

# BACKUP DESTINATION INFORMATION
# The s3+http scheme uses the default aws s3 hostname.
# Use s3://host/bucket/[backup-folder/] if you want to specify the host name.
# If using the s3://... scheme and you have s3cmd installed, be sure to change
# 's3.amazonaws.com' to the appropriate host in your .s3cfg file so that the
# remote file size check will work.
#DEST="s3://host/backup-bucket/backup-folder/"
DEST="s3+http://asdf/asdf/"

INCLIST=(  "/var/backup/db" \
           "/var/www/wordpress/wp-content" \
        )

STATIC_OPTIONS="--full-if-older-than 14D --s3-use-new-style  --s3-european-buckets"

CLEAN_UP_TYPE="remove-all-but-n-full"
CLEAN_UP_VARIABLE="4"

LOGDIR="/var/log/duplicity-backup/"
LOG_FILE="duplicity-`date +%Y-%m-%d_%H-%M`.txt"
LOG_FILE_OWNER="root:ubuntu"
VERBOSITY="-v3"

EMAIL_TO=
EMAIL_FROM=
EMAIL_SUBJECT=

MAIL="mailx"     # default command for Linux mail
@zertrin
Copy link
Owner

zertrin commented Mar 14, 2014

The error message Import of duplicity.backends.giobackend Failed: No module named gio isn't important here, duplicity is able to do fine without it. Did you even search on internet for this message?
A very basic search (http://bit.ly/Ne4ksG) gave me this :
http://www.rfc3092.net/2013/09/missing-modules-for-paramiko-and-gio-in-duplicity-foo/
Should fix the giobackend notification.

As for why the whole thing doesn't work, this is related to the other error message you didn't notice:

NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['HmacAuthV1Handler'] Check your credentials

Before looking deeper into what this could mean, please ensure your credentials are correct. If they are, I invite you to search more on this problem on your side first before.
I don't think this issue has something to do with the script in itself. I don't do support for duplicity here, only the wrapper script.

As you seem to be using Amazon S3, check if you configured s3cmd properly and try to get duplicity working with a minimal example before using duplicity-backup.sh. You can only begin using this script once duplicity is properly configured to access your storage backend.

@janikvonrotz
Copy link
Author

Sry to bother you with this. Just got a bit frustrated trying all day to solve this issue. Neither I am a ubuntu nor I am duplcity pro. So thanks for any kind of help. Your minimal example approach is a great idea.

@janikvonrotz
Copy link
Author

The error message was a little bit misleading. I didn't granted the AWS backup user the appropriate permissions. s3cmd worked properly with them, but duplicity failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants