|
||
---|---|---|
examples | ||
.env | ||
CHANGELOG.md | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
entrypoint.sh |
README.md
BorgContainer
Docker volume backup on a schedule.
Usage
Run a backup
docker run --rm backup backup
Schedule a backup
Mount a crontab
to /etc/crontab
, such as:
0 1 * * * /entrypoint backup
services:
backup:
image: git.zagouri.org/max/borgcontainer:latest
init: true
environment:
- BORG_REPO=/tmp/borgrepo
- BORG_PASSPHRASE=secretpassphrase
volumes:
# Mount docker socket
- /var/run/docker.sock:/var/run/docker.sock:ro
# Mount crontab with scheduled backups
- ./crontab:/etc/crontab
Configuration
Environment variables
table with environment variables and their default values and descriptions
Variable | Default | Example | Description |
---|---|---|---|
BORG_REPO | ssh://user@host:/data/repo |
Path to the borg repository | |
BORG_PASSPHRASE | TOKEN |
Passphrase to use for the encryption | |
BORG_CRON_SCHEDULE | 0 1 * * * |
Crontab to schedule the backups |
Examples
See examples/
.
Build
Update .env
and Run
docker buildx build --push --platform=linux/amd64,linux/arm64/v8 -t git.zagouri.org/max/borgcontainer:$(. .env && echo $VERSION) -t git.zagouri.org/max/borgcontainer:latest .