fsbackup.conf
The main configuration file lives at /etc/fsbackup/fsbackup.conf. All scripts source it at startup.
Full example
SNAPSHOT_ROOT="/backup/snapshots"
# =============================================================================
# Schedule — OnCalendar= values for each class/type
# Applied to systemd timers via: sudo fs-schedule-apply.sh
# Format: https://www.freedesktop.org/software/systemd/man/systemd.time.html
# =============================================================================
CLASS1_DAILY_SCHEDULE="*-*-* 01:45"
CLASS1_WEEKLY_SCHEDULE="Sat *-*-* 02:00"
CLASS1_MONTHLY_SCHEDULE="*-*-01 03:00"
CLASS2_DAILY_SCHEDULE="*-*-* 02:15"
CLASS2_WEEKLY_SCHEDULE="Sat *-*-* 02:30"
# CLASS2_MONTHLY_SCHEDULE="" # omit to disable monthly class2 runs
CLASS3_MONTHLY_SCHEDULE="*-*-01 04:00"
# =============================================================================
# Retention — how many ZFS snapshots of each type to keep per target
# Applied by fs-retention.sh (runs daily via fsbackup-retention.timer)
# KEEP_ANNUAL=0 means keep all annual snapshots indefinitely
# =============================================================================
KEEP_DAILY=14
KEEP_WEEKLY=8
KEEP_MONTHLY=12
KEEP_ANNUAL=0
# =============================================================================
# S3 export
# =============================================================================
S3_BUCKET="fsbackup-snapshots-XXXXXX"
S3_SKIP_CLASSES=""
# S3_AWS_PROFILE="fsbackup"
Keys
SNAPSHOT_ROOT
Path to the ZFS snapshot dataset mountpoint. Defaults to /backup/snapshots.
SNAPSHOT_ROOT="/backup/snapshots"
All per-target datasets are created under this root by fs-provision.sh:
/backup/snapshots/<class>/<target>/
ZFS snapshots appear inside each dataset at .zfs/snapshot/<name>/, e.g.:
/backup/snapshots/class1/myapp.data/.zfs/snapshot/daily-2026-03-23/
CLASS<N>_<TYPE>_SCHEDULE
OnCalendar= strings that control when each runner timer fires. Applied to systemd drop-in files by fs-schedule-apply.sh.
| Variable | Example | Timer |
|---|---|---|
CLASS1_DAILY_SCHEDULE | *-*-* 01:45 | fsbackup-runner-daily@class1.timer |
CLASS1_WEEKLY_SCHEDULE | Sat *-*-* 02:00 | fsbackup-runner-weekly@class1.timer |
CLASS1_MONTHLY_SCHEDULE | *-*-01 03:00 | fsbackup-runner-monthly@class1.timer |
Omit a variable (or leave it empty) to disable that timer. See Scheduling for the full list and format details.
KEEP_DAILY / KEEP_WEEKLY / KEEP_MONTHLY / KEEP_ANNUAL
How many ZFS snapshots of each type to retain per target dataset. fs-retention.sh runs daily and destroys the oldest snapshots beyond these counts.
KEEP_DAILY=14 # keep last 14 daily snapshots
KEEP_WEEKLY=8 # keep last 8 weekly snapshots
KEEP_MONTHLY=12 # keep last 12 monthly snapshots
KEEP_ANNUAL=0 # 0 = keep all annual snapshots indefinitely
S3_BUCKET
The S3 bucket to export snapshots to. Must exist before running fs-export-s3.sh.
S3_BUCKET="fsbackup-snapshots-abc123"
S3_SKIP_CLASSES
Space-separated list of classes to exclude from S3 export. Leave empty to export all classes.
S3_SKIP_CLASSES="" # export everything
S3_SKIP_CLASSES="class3" # skip large archives
S3_AWS_PROFILE
AWS CLI profile to use for S3 operations. Defaults to fsbackup if unset.
S3_AWS_PROFILE="fsbackup"
Snapshot path structure
Snapshots are ZFS datasets with named snapshots. The ZFS dataset path is:
backup/snapshots/<class>/<target>
The snapshot name encodes the type and date:
| Type | Snapshot name | Example |
|---|---|---|
| Daily | daily-YYYY-MM-DD | @daily-2026-03-23 |
| Weekly | weekly-YYYY-Www | @weekly-2026-W12 |
| Monthly | monthly-YYYY-MM | @monthly-2026-03 |
| Annual | annual-YYYY | @annual-2025 |
To list all snapshots:
zfs list -t snapshot -r backup/snapshots