Reference
Script reference
Reference for all fsbackup scripts — what they do, where they live, and when they run.
Scripts run by supercronic / systemd
| Script | Location | Description |
|---|---|---|
fs-runner.sh | bin/ | Core rsync snapshot runner. Takes snapshots for a class and tier. |
fs-doctor.sh | bin/ | Health check: SSH reachability, source path existence, orphan detection, annual immutability. |
fs-promote.sh | bin/ | Promotes daily snapshots to weekly (Monday) and monthly (1st of month). |
fs-annual-promote.sh | bin/ | Promotes December monthly snapshot to annual. Runs January 5. |
fs-retention.sh | bin/ | Prunes old snapshots on primary storage: 14d daily, 8w weekly, 12m monthly. |
fs-mirror.sh | bin/ | Mirrors primary snapshots to secondary drive. Runs in daily or promote mode. |
fs-mirror-retention.sh | bin/ | Prunes old snapshots on mirror: 14d daily, 12w weekly, 24m monthly. |
fs-db-export.sh | bin/ | Dumps a database via docker exec before backup runs. |
fs-export-s3.sh | s3/ | Encrypts and uploads weekly/monthly/annual snapshots to S3. |
Manual/admin utilities
| Script | Location | Description |
|---|---|---|
fs-restore.sh | utils/ | Restore files from a local snapshot to a destination. |
fs-trust-host.sh | utils/ | Seeds SSH host keys for a remote host. |
fs-nodeexp-fix.sh | utils/ | Repairs node_exporter textfile collector permissions. |
fs-annual-mirror-check.sh | utils/ | Verifies annual snapshots are synced to the mirror. |
fs-target-rename.sh | utils/ | Renames a target across all snapshot tiers. |
Scripts that run on remote hosts
| Script | Location | Description |
|---|---|---|
fsbackup_remote_init.sh | remote/ | Sets up the backup user on a remote source host. |
fs-prometheus-prebackup.sh | remote/ | Takes a Prometheus API snapshot before backup runs. |
fs-victoriametrics-prebackup.sh | remote/ | Takes a VictoriaMetrics API snapshot before backup runs. |
fs-runner.sh flags
fs-runner.sh <tier> --class <class> [options]
tier daily | weekly | monthly | annual
--class <class> class1 | class2 | class3
--target <id> Run for a single target only
--dry-run Print what would happen, make no changes
--replace-existing Force full re-sync (ignore --ignore-existing)
fs-doctor.sh flags
fs-doctor.sh --class <class>
Output columns: TARGET, STAT (OK / WARN / FAIL), DETAIL.
fs-restore.sh flags
fs-restore.sh \
--class <class> \
--target <id> \
--tier <tier> \
--date <date> \
--dest <path> \
[--to-host <hostname>] \
[--dry-run]