duplicity fails to use existing S3 bucket in boto backend
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
I recently updated to duplicity 0.7.07 and suddenly my backup to S3 fails. I believe, I managed to trace the issue to duplicity/
/usr/bin/duplicity --name duply_system --verbosity 9 / s3://s3-
with the environment variables
S3_USE_SIGV4=True
AWS_ACCESS_
AWS_SECRET_
This fails with the output given below (line number in _boto_single.py approximate as I added some debug output). I managed to reconstruct: In my case, BotoBackend._list fails as self.bucket is None. Before, BotoBackend.
Output of call:
Using archive dir: /root/.
Using backup name: duply_system
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Import of duplicity.
Main action: inc
=======
duplicity 0.7.07 ($reldate)
Args: /usr/bin/duplicity --name duply_system --verbosity 9 / s3://s3-
Linux git 4.2.0-35-generic #40~14.04.1-Ubuntu SMP Fri Mar 18 16:37:35 UTC 2016 x86_64 x86_64
/usr/bin/python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2]
=======
Using temporary directory /tmp/duplicity-
Registering (mkstemp) temporary file /tmp/duplicity-
Temp has 35986862080 available, backup will use approx 34078720.
Backtrace of previous error: Traceback (innermost last):
File "/usr/lib/
return fn(self, *args)
File "/usr/lib/
return [tobytes(x) for x in self.backend.
File "/usr/lib/
raise BackendExceptio
BackendException: No connection to backend
Attempt 1 failed. BackendException: No connection to backend
Changed in duplicity: | |
status: | In Progress → Fix Committed |
assignee: | Kenneth Loafman (kenneth-loafman) → nobody |
Changed in duplicity: | |
milestone: | 0.7.08 → 0.7.07.1 |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
Modifying resetConnection to
def resetConnection (self):
self. conn.close( )
self.storage_ uri = None
self.storage_ uri = boto.storage_ uri(self. boto_uri_ str) self.scheme, self.parsed_url, self.storage_uri) lookup( self.bucket_ name): s3_european_ buckets:
self. bucket = self.conn. create_ bucket( self.bucket_ name,
location= Location. EU)
self. bucket = self.conn. create_ bucket( self.bucket_ name)
self. bucket = self.conn. get_bucket( self.bucket_ name)
import boto
if getattr(self, 'conn', False):
self.bucket = None
self.conn = None
del self.conn
del self.storage_uri
self.conn = get_connection(
if not self.conn.
if globals.
else:
else:
seems to resolve the issue. Although, I am not sure if this is wise (found this while trial-and-erroring through the file).