This repository contains two main components:
| Name | Description |
|---|---|
| backupctl | A standalone Python tool for backing up directories, compression, encryption, and offsite upload. |
| backupctl-exporter | A Dockerized Prometheus exporter that reads backup metadata from a SQLite database and exposes metrics at /metrics. |
backupctl/
├─ backup/ # main tool
│ ├─ backupctl.py
│ ├─ config/config.yml
│ ├─ data/backupctl.sqlite
│ ├─ secrets/secret.pass
│ ├─ install.sh
│ └─ README_backupctl.md
│
├─ exporter/ # Prometheus exporter
│ ├─ backup_exporter.py
│ ├─ Dockerfile
│ ├─ docker-compose.yml
│ └─ README_backupctl_exporter.md
│
└─ backupctl-grafana-dashboard.json
- Compression to
.tar.zst(Zstandard) - Optional encryption (
openssl/age) - Offsite upload via
rclone - Scheduled runs (
cron/systemd) - Retention by count, age, and first-of-month
- YAML configuration (
config.yml) - Dual logging (
INFOandDEBUGlogs) - Run metadata stored in SQLite (
data/backupctl.sqlite) - Parallel runs (
--max-parallel) - Prometheus integration
- Exports metrics for Prometheus
- Grafana dashboard provided (
backupctl-grafana-dashboard.json) - Visualizations:
- OK/FAIL runs
- Trend of size and duration
- Last timestamp and retention
- Histograms (duration, output size)
sudo git clone https://gitlab.com/dom53/backupctl.git /opt/backupctl
cd /opt/backupctl
sudo ./install.sh
sudo python3 /opt/backupctl/backup/backupctl.py --config /opt/backupctl/backup/config/config.yml listcd /opt/backupctl/exporter
docker compose up -d --buildscrape_configs:
- job_name: "backupctl"
static_configs:
- targets: ["backupctl-exporter:9799"]Import the file:
📈 backupctl-grafana-dashboard.json
Backupctl is licensed under the Apache License 2.0 © dom53 (2025). All parts of the project (backupctl, exporter, config, tests) are open-source and may be used, modified, and distributed under the terms of this license.