diff --git a/restic/docker-compose.yml b/restic/docker-compose.yml new file mode 100644 index 0000000..4872b50 --- /dev/null +++ b/restic/docker-compose.yml @@ -0,0 +1,20 @@ +# 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