Restic Controller is a program that helps to monitor and manage restic backup repositories.
This project has three components :
- a Prometheus exporter, allowing to scrape metrics via Prometheus,
- an integrity controller which will check repositories' integrity on a schedule,
- a retention controller which will apply a given retention policy on a schedule.
With this project, you can use a central location to monitor and manage your repositories.
Restic Controller is available as a Docker image : tcardonne/restic-controller.
Basic usage :
docker run --rm -it \
-v "$PWD/config.yml:/app/config.yml" \
-p "8080:8080" \
tcardonne/restic-controller
Or, with docker-compose.yml
:
version: '3.7'
services:
controller:
image: tcardonne/restic-controller:latest
ports:
- "8080:8080"
volumes:
- "./config.yml:/app/config.yml"
Once started, the controller will run scheduled integrity checks and apply retention policies. Exported metrics are available on the /metrics
path.
Restic-Controller will, by default, look for a config.yml
file in the current working directory.
Full configuration reference available in the config.example.yml
file.
exporter:
bind_address: ":8080"
repositories:
- name: "backtothefuture"
url: "rest:https://user:[email protected]/backtothefuture"
# envFromFile:
# RESTIC_REST_USERNAME: /etc/secrets/backtothefuture/username
# RESTIC_REST_PASSWORD: /etc/secrets/backtothefuture/password
password: "password"
# passwordFile: "/etc/secrets/backtothefuture-repository"
check:
schedule: "0 3 * * *"
retention:
schedule: "0 4 * * *"
policy:
keep_last: 15
This configuration will run integrity checks everyday at 3AM and apply the retention policy at 4AM. The policy will keep the last 15 snapshots.
A Grafana dashboard and a sample Alertmanager rules file are available in the examples/
directory.
This project is licensed under BSD 2-Clause License. You can find the complete text in the file LICENSE
.