# Docker Volume Backup

Docker Volume Backup is a lightweight (below 25MB) companion container that backs up Docker volumes locally or to any S3, WebDAV, Azure Blob Storage, Dropbox, Google Drive or SSH compatible storage, in recurring or. It is open source and self-hosted, installable on Docker Hub.

Canonical page: https://ourlocalhost.com/app/7896/docker-volume-backup

## Description

docker-volume-backup is a lightweight (below 25MB) companion container that backs up Docker volumes locally or to any S3, WebDAV, Azure Blob Storage, Dropbox, Google Drive or SSH compatible storage, in recurring or one-off runs. It automatically rotates away old backups, supports GPG encryption and sends notifications for failed runs. Ideal for homelabbers who want a simple, self-contained way to protect container data.

## Platform availability

Available on 1 of 10 platforms: Any server.

## Health score

75/100 (Good), based on 4 of 5 factors.
- Maintained: 100 (last commit 1 day ago)
- Popular: 72 (4,086 GitHub stars)
- Easy to install: 25 (1 install platform, install notes)
- Security check: 77 (no serious findings, 1 minor, CI, tests, OpenSSF Scorecard 5.1/10)

## Links

- Documentation: https://github.com/offen/docker-volume-backup
- Docker Hub: https://hub.docker.com/r/offen/docker-volume-backup
- Official website: https://offen.github.io/docker-volume-backup/
- GitHub: https://github.com/offen/docker-volume-backup

## Common questions

### How do I stop containers during backup to ensure data consistency?

Add the label docker-volume-backup.stop-during-backup=true to the container; the backup container stops it during the backup and restarts it afterwards. This requires the Docker socket to be mounted so the script can control other containers.

### How does docker-volume-backup work with rootless Docker?

When using rootless Docker, mount /run/user/1000/docker.sock instead of the usual /var/run/docker.sock, otherwise the backup container cannot see or stop your containers.

### How do I automatically delete old backups?

Set the BACKUP_RETENTION_DAYS environment variable (e.g. 7 to keep a week of backups), and optionally BACKUP_PRUNING_PREFIX so only matching files are pruned. Without it, backups accumulate indefinitely and can fill your disk.

### Why isn't a local copy of my backup showing up anywhere?

You need to mount a folder to /archive in the backup container; otherwise no local copy of the backup is kept anywhere you can reach.

### Can I back up containers that aren't managed by Docker Compose?

The tool is Compose-centric in its typical usage, so containers not set up via Compose are harder to integrate, though one-off backups using the Docker CLI are supported.

## Alternatives

- Nautical Backup

---
Source: Our Local Host (https://ourlocalhost.com/app/7896/docker-volume-backup), the self-hosted and open-source app directory.
