Just... rsnapshot
docker run \
--rm \
-v <path to config>:/config
-v <path to snapshots>:/snapshots
chappio/rsnapshot
daily
--rm
- delete the container after execution-v /config
- mount the volume which contains the rsnapshot configurations-v /snapshots
- mount the volume which contains the snapshotsdaily
- pass arguments to rsnapshot
So if you wish to create a backup of the /mnt/shares
folder you:
Create a new configuration:
docker run --rm -v /path/to/configs:/config chappio/rsnapshot
Update your configuration:
nano /path/to/configs/rsnapshot.conf
Run the backup:
docker run --rm -v /path/to/configs:/config -v /path/to/snapshots:/snapshots -v /mnt/shares:/mnt/shares:ro chappio/rsnapshot daily
services:
rsnapshot:
image: chappio/rsnapshot
volumes:
- ./config:/config
- ./snapshots:/snapshots
- /mnt:/mnt
And then execute:
docker-compose run --rm rsnapshot daily