This docker-compose.yml
file runs Restic backup as per crontab.txt
with parameters set in .env
using the restic/restic image.
cp .env.template .env
vi .env
docker-compose up -d
docker logs restic -f
For monitoring purposes the script data/restic/push-metric.sh
is executed prior to and after any backup.
If the environment variable $PROM_GW_URL
is set the respective Prometheus Push Gateway will get informed about the backup start and result (stop, incomplete, fail). In case of a proper stop, further statistics will be send to the Push Gateway.
/ # restic ls
Fatal: Invalid arguments, either give one or more snapshot IDs or set filters.
/ # restic snapshots
repository 276b6a79 opened successfully, password is correct
ID Time Host Tags Paths
------------------------------------------------------------------
e70bd81a 2020-01-05 23:39:20 restic /mnt/source
d629a178 2020-01-06 20:20:06 restic /mnt/source
------------------------------------------------------------------
2 snapshots
restic diff e70bd81a d629a178