duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Duplicity-talk] Backblaze B2 restore fails with S3 API with Duplicity.


From: Caballero, Danny (Dan)
Subject: [Duplicity-talk] Backblaze B2 restore fails with S3 API with Duplicity.
Date: Thu, 7 Sep 2023 23:02:32 +0000

Hello, I'm hoping someone here has seen this issue and can help me out. I've spent the past week trying to debug failed restore attempts from a Backblaze B2 bucket to no avail. Note: I've replaced my actual bucket name with $MY_BUCKET.

"botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "https://s3.us-east-005.backblaze2.com/$MY_BUCKET"

  • I've got duplicity backups working with a Backblaze B2 bucket using an S3 endpoint.
  • I can use duplicity commands like "collection-status", "cleanup" and "list-current-files" just fine.
  • Crucially, my "restore" attempts fail with a connection timeout after several minutes of trying to connect. 
I've opened a ticket with Backblaze but so far, they've been unable to address anything specific to Duplicity. I'm going through the gauntlet of basic troubleshooting with them but it's slow going.

I've tried both Duplicity 2.1.1 and Duplicity 1.2.3 with the same error results.

Here's output from the Python 3.8 virtual environment I have setup. Thank you in advance for any help.

python -V
Python 3.8.14

duplicity --version
duplicity 2.1.1

pip list
Package            Version
------------------ ---------
awscli             1.29.42
boto3              1.28.42
botocore           1.31.43
certifi            2023.7.22
charset-normalizer 3.2.0
colorama           0.4.4
docutils           0.16
duplicity          2.1.1
fasteners          0.18
idna               3.4
jmespath           1.0.1
packaging          23.1
pip                23.2.1
pyasn1             0.5.0
python-dateutil    2.8.2
PyYAML             6.0.1
requests           2.31.0
rsa                4.7.2
s3transfer         0.6.2
setuptools         41.6.0
setuptools-scm     7.1.0
six                1.16.0
tomli              2.0.1
typing_extensions  4.7.1
urllib3            1.26.16



duplicity -v9 restore --no-encryption --timeout 300 --path-to-restore class --time 2023-09-03 --s3-endpoint-url="" s3://$MY_BUCKET /root/b2restore/
GPG binary is /bin/gpg, version 2.0.22
Import of duplicity.backends.adbackend Succeeded
Import of duplicity.backends.azurebackend Succeeded
Import of duplicity.backends.b2backend Succeeded
Import of duplicity.backends.boxbackend Succeeded
Import of duplicity.backends.cfbackend Succeeded
Import of duplicity.backends.dpbxbackend Succeeded
Import of duplicity.backends.gdocsbackend Succeeded
Import of duplicity.backends.gdrivebackend Succeeded
Import of duplicity.backends.giobackend Succeeded
Import of duplicity.backends.hsibackend Succeeded
Import of duplicity.backends.hubicbackend Succeeded
Import of duplicity.backends.idrivedbackend Succeeded
Import of duplicity.backends.imapbackend Succeeded
Import of duplicity.backends.jottacloudbackend Succeeded
Import of duplicity.backends.lftpbackend Succeeded
Import of duplicity.backends.localbackend Succeeded
Import of duplicity.backends.mediafirebackend Succeeded
Import of duplicity.backends.megabackend Succeeded
Import of duplicity.backends.megav2backend Succeeded
Import of duplicity.backends.megav3backend Succeeded
Import of duplicity.backends.multibackend Succeeded
Import of duplicity.backends.ncftpbackend Succeeded
Import of duplicity.backends.onedrivebackend Succeeded
Import of duplicity.backends.par2backend Succeeded
Import of duplicity.backends.pcabackend Succeeded
Import of duplicity.backends.pydrivebackend Succeeded
Import of duplicity.backends.rclonebackend Succeeded
Import of duplicity.backends.rsyncbackend Succeeded
Import of duplicity.backends.s3_boto3_backend Succeeded
Import of duplicity.backends.slatebackend Succeeded
Import of duplicity.backends.ssh_paramiko_backend Succeeded
Import of duplicity.backends.ssh_pexpect_backend Succeeded
Import of duplicity.backends.swiftbackend Succeeded
Import of duplicity.backends.sxbackend Succeeded
Import of duplicity.backends.tahoebackend Succeeded
Import of duplicity.backends.webdavbackend Succeeded
Import of duplicity.backends.xorrisobackend Succeeded
Using archive dir: /root/.cache/duplicity/e0df479272a543d4986ff2b34f22f560
Using backup name: e0df479272a543d4986ff2b34f22f560
Acquiring lockfile /root/.cache/duplicity/e0df479272a543d4986ff2b34f22f560/lockfile
================================================================================
duplicity 2.1.1

Args: /root/duplicity2/bin/duplicity -v9 restore --no-encryption --timeout 300 --path-to-restore class --time 2023-09-03 --s3-endpoint-url="" s3://$MY_BUCKET /root/b2restore/

/root/duplicity2/bin/python 3.8.14 (default, Sep 19 2022, 09:47:48)
[GCC 9.1.1 20190605 (Red Hat 9.1.1-2)]
================================================================================
Using temporary directory /tmp/duplicity-guuuyyg1-tempdir
Registering (mkstemp) temporary file /tmp/duplicity-guuuyyg1-tempdir/mkstemp-3n1m9bhr-1
Temp has 1520262860800 available, backup will use approx 272629760.
Backtrace of previous error: Traceback (innermost last):
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backend.py", line 368, in inner_retry
    return fn(self, *args)
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backend.py", line 594, in list
    return [tobytes(x) for x in self.backend._list()]
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backends/s3_boto3_backend.py", line 197, in _list
    self.reset_connection()
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backends/s3_boto3_backend.py", line 101, in reset_connection
    self.s3.meta.client.head_bucket(Bucket=self.bucket_name)
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/client.py", line 535, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/client.py", line 963, in _make_api_call
    http, parsed_response = self._make_request(
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/client.py", line 986, in _make_request
    return self._endpoint.make_request(operation_model, request_dict)
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/endpoint.py", line 119, in make_request
    return self._send_request(request_dict, operation_model)
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/endpoint.py", line 202, in _send_request
    while self._needs_retry(
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/endpoint.py", line 354, in _needs_retry
    responses = self._event_emitter.emit(
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/hooks.py", line 412, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/hooks.py", line 256, in emit
    return self._emit(event_name, kwargs)
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/hooks.py", line 239, in _emit
    response = handler(**kwargs)
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/retryhandler.py", line 207, in __call__
    if self._checker(**checker_kwargs):
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/retryhandler.py", line 284, in __call__
    should_retry = self._should_retry(
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/retryhandler.py", line 320, in _should_retry
    return self._checker(attempt_number, response, caught_exception)
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/retryhandler.py", line 363, in __call__
    checker_response = checker(
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/retryhandler.py", line 247, in __call__
    return self._check_caught_exception(
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/retryhandler.py", line 416, in _check_caught_exception
    raise caught_exception
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/endpoint.py", line 281, in _do_get_response
    http_response = self._send(request)
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/endpoint.py", line 377, in _send
    return self.http_session.send(request)
  File "/root/duplicity2/lib64/python3.8/site-packages/botocore/httpsession.py", line 500, in send
    raise ConnectTimeoutError(endpoint_url=request.url, error=e)
 botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "https://s3.us-east-005.backblaze2.com/$MY_BUCKET"

Attempt of list Nr. 1 failed. ConnectTimeoutError: Connect timeout on endpoint URL: "https://s3.us-east-005.backblaze2.com/$MY_BUCKET"
Backtrace of previous error: Traceback (innermost last):
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backend.py", line 368, in inner_retry
    return fn(self, *args)
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backend.py", line 594, in list
    return [tobytes(x) for x in self.backend._list()]
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backends/s3_boto3_backend.py", line 200, in _list
    for obj in self.bucket.objects.filter(Prefix=self.key_prefix):
 AttributeError: 'NoneType' object has no attribute 'objects'

Attempt of list Nr. 2 failed. AttributeError: 'NoneType' object has no attribute 'objects'
Backtrace of previous error: Traceback (innermost last):
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backend.py", line 368, in inner_retry
    return fn(self, *args)
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backend.py", line 594, in list
    return [tobytes(x) for x in self.backend._list()]
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backends/s3_boto3_backend.py", line 200, in _list
    for obj in self.bucket.objects.filter(Prefix=self.key_prefix):
 AttributeError: 'NoneType' object has no attribute 'objects'

Attempt of list Nr. 3 failed. AttributeError: 'NoneType' object has no attribute 'objects'
Backtrace of previous error: Traceback (innermost last):
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backend.py", line 368, in inner_retry
    return fn(self, *args)
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backend.py", line 594, in list
    return [tobytes(x) for x in self.backend._list()]
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backends/s3_boto3_backend.py", line 200, in _list
    for obj in self.bucket.objects.filter(Prefix=self.key_prefix):
 AttributeError: 'NoneType' object has no attribute 'objects'

Attempt of list Nr. 4 failed. AttributeError: 'NoneType' object has no attribute 'objects'
Backtrace of previous error: Traceback (innermost last):
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backend.py", line 368, in inner_retry
    return fn(self, *args)
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backend.py", line 594, in list
    return [tobytes(x) for x in self.backend._list()]
  File "/root/duplicity2/lib64/python3.8/site-packages/duplicity/backends/s3_boto3_backend.py", line 200, in _list
    for obj in self.bucket.objects.filter(Prefix=self.key_prefix):
 AttributeError: 'NoneType' object has no attribute 'objects'

Giving up after 5 attempts. AttributeError: 'NoneType' object has no attribute 'objects'
Releasing lockfile /root/.cache/duplicity/e0df479272a543d4986ff2b34f22f560/lockfile
Removing still remembered temporary file /tmp/duplicity-guuuyyg1-tempdir/mkstemp-3n1m9bhr-1


----
Dan Caballero
Systems Administrator
Academic Computing Solutions
IMSS - Caltech
https://imss.caltech.edu

reply via email to

[Prev in Thread] Current Thread [Next in Thread]