Toastie 7e9b53e357 added comment vor 2 Wochen
..
data 79252468d5 #1 consolidated prom push vor 2 Jahren
.env.template 7e9b53e357 added comment vor 2 Wochen
.gitignore eba7e41477 added .backupignore for cache vor 4 Jahren
Dockerfile 0d283d3e1c added local build incl. curl vor 2 Jahren
README.md 7cb92950e1 moved general infos to prepare repo split vor 2 Jahren
docker-compose.yml 20b484a93a added external network for prometheus pushgateway vor 4 Monaten

README.md

Restic

Restic, a modern backup program which supports many different storage types.

The setup in this repository will use MinIO, an Amazon S3 compatible object storage, as backup target. Further we'll make use of:

  • The official restic/restic container image
  • Docker Compose for orchistration
  • Cron (in the restic container) to schedule backups
  • Scripts to run new and clean up old backups
  • Scripts to push metrics for Prometheus

Setup

  1. Get your MinIO server running or make use of the IN-Ulm MinIO Service
  2. Setup a S3 bucket with MinIO MC
  3. Setup Restic
# Setup your config
cp .env.template .env
vi .env

# Run the container
docker-compose up -d
docker logs restic -f

Operation

Monitoring

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.

List snapshots with date/time

/ # 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

Show diff between snapshots

restic diff e70bd81a d629a178

References