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

Bug: Docker volume backup to B2 fails ("context deadline exceeded") #357

Open
max-critcrew opened this issue Mar 7, 2024 · 0 comments
Open

Comments

@max-critcrew
Copy link

max-critcrew commented Mar 7, 2024

Describe the bug
When trying to backup a local docker volume to Backblaze B2 it after ~60 seconds with the following error:
Fatal: unable to open repository at b2:backup-bucket-test: context deadline exceeded

TL;DR: Only the combination of B2 as backend + docker volume as location is broken. Backing up a local folder location to B2 works fine. Backing up a docker volume to a local backend works fine.

Full console output:

> Executing: /usr/bin/docker volume inspect backup-source-container-test-volume
[
    {
        "CreatedAt": "2024-03-07T14:28:38Z",
        "Driver": "local",
        "Labels": {
            "com.docker.compose.project": "backup-source-container-test",
            "com.docker.compose.version": "2.20.2",
            "com.docker.compose.volume": "backup-source-container-test-volume"
        },
        "Mountpoint": "/var/lib/docker/volumes/backup-source-container-test-volume/_data",
        "Name": "backup-source-container-test-volume",
        "Options": null,
        "Scope": "local"
    }
]
> Executing: /usr/bin/docker run --rm --entrypoint ash --workdir /data --volume backup-source-container-test-volume:/data --hostname my-server-1 --env B2_ACCOUNT_KEY=<redacted> --env B2_ACCOUNT_ID=<redacted> --env RESTIC_PASSWORD=<redacted> --env RESTIC_REPOSITORY=b2:backup-server1-test cupcakearmy/autorestic:1.7.11 -c restic backup --tag ar:location:docker-volume-test /data

Location definition:

locations:
  docker-volume-test:
    from:
    - backup-source-container-test-volume
    type: volume
    to:
    - b2-bucket-test-1-root-folder
    hooks:
      dir: ""
      before: []
      after: []
      success: []
      failure: []
    cron: ""
    options:
      forget:
        keep-daily:
        - 4
        keep-hourly:
        - 3
        keep-last:
        - 5
        keep-monthly:
        - 12
        keep-weekly:
        - 1
        keep-within:
        - 14d
        keep-yearly:
        - 7
    copyoption: {}

Backend definition:

backends:
  b2-bucket-test-1-root-folder:
    type: b2
    path: backup-server1-test
    key: <redacted>
    env:
      b2_account_id: <redacted>
      b2_account_key: <redacted>
    rest:
      user: ""
      password: ""
    options: {}

Further tests I did in order to rule out that my B2 is not working or the docker volume is the issue:

  • If I change the backend of my location docker-volume-test to a local backend, it backs up just fine
  • If I back up a local folder with my backend b2-bucket-test-1-root-folder, it also backs up fist fine

Expected behavior

  • Backing up a docker volume to B2 works just as it does with a local backend for example

Environment

  • OS:
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
  • Version:
$ autorestic --version
autorestic version 1.7.11

Additional context
If anybody could run a test to backup a docker volume to Backblaze (or any other cloud provider), that'd be awesome to compare configurations. Any helps is much appreciated and thanks for your time reading this :)

@max-critcrew max-critcrew changed the title Docker volume backup with backend Backblaze B2 fails with "context deadline exceeded" Bug: Docker volume backup to B2 fails ("context deadline exceeded") Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant