Reference
Script reference
Reference for all fsbackup scripts — what they do, where they live, and when they run.
Scripts run by systemd timers
| Script | Location | Description |
|---|---|---|
fs-runner.sh | bin/ | Core rsync snapshot runner. Takes ZFS snapshots for a class and tier. |
fs-doctor.sh | bin/ | Health check: SSH reachability, source path existence. |
fs-retention.sh | bin/ | Prunes old ZFS snapshots per KEEP_DAILY/WEEKLY/MONTHLY/ANNUAL. |
fs-export-s3.sh | s3/ | Encrypts and uploads weekly/monthly/annual snapshots to S3. |
Manual/admin utilities
| Script | Location | Description |
|---|---|---|
fs-restore.sh | utils/ | List and restore files from local ZFS snapshots. |
fs-trust-host.sh | utils/ | Seeds SSH host keys for a remote host. |
fs-provision.sh | bin/ | Creates ZFS datasets for all targets in targets.yml. |
fs-fix-permissions.sh | bin/ | Sets ACLs on local source paths for the fsbackup user. |
fs-schedule-apply.sh | bin/ | Writes OnCalendar= drop-ins for each timer from fsbackup.conf. |
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 (skips --ignore-existing)
fs-doctor.sh flags
fs-doctor.sh --class <class>
Output columns: TARGET, STAT (OK / WARN / FAIL), DETAIL.
fs-restore.sh flags
# List snapshots
fs-restore.sh list [--class <class>] [--id <target>]
# Restore a snapshot
fs-restore.sh restore \
--class <class> \
--id <target> \
{ --snapshot <name> | --latest [--type <tier>] } \
--dest <path> \
[--dry-run]
fs-retention.sh flags
fs-retention.sh [--dry-run]
Reads KEEP_DAILY, KEEP_WEEKLY, KEEP_MONTHLY, KEEP_ANNUAL from fsbackup.conf. KEEP_ANNUAL=0 means keep all annual snapshots indefinitely.
fs-provision.sh flags
fs-provision.sh [--dry-run] [--targets-file <path>]
Creates backup/snapshots/<class>/<target> ZFS datasets for all targets defined in targets.yml. Idempotent — skips datasets that already exist.