docker/restic/docker-compose.yml
2025-11-18 02:34:53 -05:00

20 lines
568 B
YAML

# init with
# docker run --rm -e RESTIC_PASSWORD=yourpassword -v G:/restic-backups:/backup restic/restic init --repo /backup
services:
restic-backup:
image: restic/restic:latest
container_name: restic-backup
environment:
- RESTIC_REPOSITORY=/backup
- RESTIC_PASSWORD=yourpassword
volumes:
- E:/installers:/data:ro
- G:/restic-backups:/backup
entrypoint: >
sh -c "while true; do
restic backup /data &&
restic forget --prune --keep-last 7;
sleep 43200;
done"
restart: unless-stopped