MCPcopy
hub / github.com/offen/docker-volume-backup

github.com/offen/docker-volume-backup @v2.48.2-test.1 sqlite

repository ↗ · DeepWiki ↗ · release v2.48.2-test.1 ↗
161 symbols 493 edges 31 files 82 documented · 51%
README

offen.software logo

docker-volume-backup

Backup Docker volumes locally or to any S3, WebDAV, Azure Blob Storage, Dropbox, Google Drive or SSH compatible storage.

The offen/docker-volume-backup Docker image can be used as a lightweight (below 25MB) companion container to an existing Docker setup. It handles recurring or one-off backups of Docker volumes to a local directory, any S3, WebDAV, Azure Blob Storage, Dropbox, Google Drive or SSH compatible storage (or any combination thereof) and rotates away old backups if configured. It also supports encrypting your backups using GPG and sending notifications for (failed) backup runs.

Documentation is found at https://offen.github.io/docker-volume-backup - Quickstart - Configuration Reference - How Tos - Recipes


Quickstart

Recurring backups in a compose setup

Add a backup service to your compose setup and mount the volumes you would like to see backed up:

services:
  volume-consumer:
    build:
      context: ./my-app
    volumes:
      - data:/var/my-app
    labels:
      # This means the container will be stopped during backup to ensure
      # backup integrity. You can omit this label if stopping during backup
      # not required.
      - docker-volume-backup.stop-during-backup=true

  backup:
    # In production, it is advised to lock your image tag to a proper
    # release version instead of using `latest`.
    # Check https://github.com/offen/docker-volume-backup/releases
    # for a list of available releases.
    image: offen/docker-volume-backup:latest
    restart: always
    env_file: ./backup.env # see below for configuration reference
    volumes:
      - data:/backup/my-app-backup:ro
      # Mounting the Docker socket allows the script to stop and restart
      # the container during backup. You can omit this if you don't want
      # to stop the container. In case you need to proxy the socket, you can
      # also provide a location by setting `DOCKER_HOST` in the container
      - /var/run/docker.sock:/var/run/docker.sock:ro
      # If you mount a local directory or volume to `/archive` a local
      # copy of the backup will be stored there. You can override the
      # location inside of the container by setting `BACKUP_ARCHIVE`.
      # You can omit this if you do not want to keep local backups.
      - /path/to/local_backups:/archive
volumes:
  data:

One-off backups using Docker CLI

To run a one time backup, mount the volume you would like to see backed up into a container and run the backup command:

docker run --rm \
  -v data:/backup/data \
  --env AWS_ACCESS_KEY_ID="<xxx>" \
  --env AWS_SECRET_ACCESS_KEY="<xxx>" \
  --env AWS_S3_BUCKET_NAME="<xxx>" \
  --entrypoint backup \
  offen/docker-volume-backup:v2

Alternatively, pass a --env-file in order to use a full config as described in the docs.

Looking for help?

In case your are looking for help or guidance on how to incorporate docker-volume-backup into your existing setup, consider becoming a sponsor and book a one hour consulting session.


Copyright © 2026 offen.software and contributors. Distributed under the MPL-2.0 License.

Extension points exported contracts — how you extend this code

Backend (Interface)
Backend is an interface for defining functions which all storage providers support. [7 implementers]
internal/storage/storage.go
Log (FuncType)
(no doc)
internal/storage/storage.go

Core symbols most depended-on inside this repo

Wrap
called by 217
internal/errwrap/wrap.go
Close
called by 10
cmd/backup/util.go
Name
called by 9
internal/storage/storage.go
registerHook
called by 8
cmd/backup/hooks.go
DoPrune
called by 7
internal/storage/storage.go
Copy
called by 6
internal/storage/storage.go
Name
called by 6
internal/storage/googledrive/googledrive.go
String
called by 6
cmd/backup/config.go

Shape

Method 70
Function 43
Struct 38
TypeAlias 7
FuncType 2
Interface 1

Languages

Go100%

Modules by API surface

cmd/backup/config.go19 symbols
cmd/backup/util.go12 symbols
cmd/backup/encrypt_archive.go10 symbols
internal/storage/storage.go9 symbols
cmd/backup/archive.go9 symbols
cmd/backup/notifications.go8 symbols
internal/storage/local/local.go7 symbols
cmd/backup/config_provider.go7 symbols
cmd/backup/command.go7 symbols
internal/storage/webdav/webdav.go6 symbols
internal/storage/ssh/ssh.go6 symbols
internal/storage/s3/s3.go6 symbols

Dependencies from manifests, versioned

cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
filippo.io/agev1.3.1 · 1×
filippo.io/edwards25519v1.1.1 · 1×
filippo.io/hpkev0.4.0 · 1×
github.com/Azure/azure-sdk-for-go/sdk/azcorev1.22.0 · 1×
github.com/Azure/azure-sdk-for-go/sdk/azidentityv1.14.0 · 1×
github.com/Azure/azure-sdk-for-go/sdk/internalv1.12.0 · 1×
github.com/Azure/azure-sdk-for-go/sdk/storage/azblobv1.6.3 · 1×
github.com/AzureAD/microsoft-authentication-library-for-gov1.7.2 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×

For agents

$ claude mcp add docker-volume-backup \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact