Repolode
offen

offen/docker-volume-backup

A lightweight companion container that backs up Docker volumes on a schedule to local directories, S3, WebDAV, Azure, Dropbox, Google Drive or SSH storage.

Stars
4,069
Forks
161
Open issues
28
Last commit
3 days ago

What is it?

docker-volume-backup is a Docker image meant to run alongside an existing Docker setup. It performs recurring or one-off backups of Docker volumes to a local directory, to any S3, WebDAV, Azure Blob Storage, Dropbox, Google Drive or SSH compatible storage, or to a combination of these targets.

Old backups can be rotated away according to the configured retention. Backups can be encrypted with GPG, and notifications can be sent for failed backup runs. The image is described as below 25MB.

In a Compose setup, you add a backup service that mounts the volumes to back up. Containers labeled with stop-during-backup can be stopped while the backup runs to keep data consistent, which requires mounting the Docker socket. A one-off backup can also be run with the docker CLI.

Key features

  • 01Recurring and one-off backups of Docker volumes
  • 02Storage targets include local directories, S3, WebDAV, Azure Blob Storage, Dropbox, Google Drive and SSH
  • 03Combine multiple storage targets in one setup
  • 04Automatic rotation of old backups
  • 05GPG encryption of backups
  • 06Notifications for failed backup runs

Use cases

  • Backing up data volumes of a Docker Compose application on a schedule
  • Copying volume backups to an off-site S3 bucket or SSH server
  • Running a one-time volume backup from the command line before an upgrade

Quick start

  1. 1

    Add a backup service to your compose file and mount the volumes to back up

  2. 2

    Run a one-off backup with the Docker CLI

    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

Things to know

  • Configuration is needed for remote storage such as S3, WebDAV, Azure, Dropbox, Google Drive or SSH.
  • Stopping containers during backup requires mounting the Docker socket, which grants elevated access to the host.

Topics

FAQ

What is docker-volume-backup?
A lightweight companion container that backs up Docker volumes on a schedule to local directories, S3, WebDAV, Azure, Dropbox, Google Drive or SSH storage. docker-volume-backup is a Docker image meant to run alongside an existing Docker setup. It performs recurring or one-off backups of Docker volumes to a local directory, to any S3, WebDAV, Azure Blob Storage, Dropbox, Google Drive or SSH compatible storage, or to a combination of these targets.
Is docker-volume-backup free to use? What license does it have?
docker-volume-backup is open source under the MPL-2.0 license. Check the license terms before using it in commercial products.
Is docker-volume-backup still maintained?
Actively maintained. The last commit to docker-volume-backup was on Nov 4, 2026.
What can I use docker-volume-backup for?
Backing up data volumes of a Docker Compose application on a schedule Copying volume backups to an off-site S3 bucket or SSH server Running a one-time volume backup from the command line before an upgrade
How do I install docker-volume-backup?
Add a backup service to your compose file and mount the volumes to back up Run a one-off backup with the Docker CLI: 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
Where can I get docker-volume-backup?
The source code and installation instructions are on GitHub: https://github.com/offen/docker-volume-backup

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects