Getting Started

What is fsbackup?

An overview of fsbackup — what it does, how it works, and what it's designed for.

fsbackup is a ZFS-native rsync backup system for home labs. It runs directly on the backup server as a systemd service, pulls backups from remote hosts over SSH, and stores them as ZFS snapshots on a local drive.

How it works

fsbackup rsyncs each target into a dedicated ZFS dataset. After a successful sync, it creates a ZFS snapshot named for the type and date — for example, @daily-2026-03-23 or @weekly-2026-W12. ZFS deduplicates unchanged data at the block level across snapshots, making storage efficient without the fragility of hard-link trees.

Snapshots are organized by type:

TypeFrequencyDefault retention
DailyEvery day14 snapshots
WeeklyWeekly runner8 snapshots
MonthlyMonthly runner12 snapshots
Annual(configure as needed)Unlimited

Retention is enforced daily by fs-retention.sh, which uses zfs destroy to remove the oldest snapshots beyond the configured keep count.

Data classes

Backup targets are grouped into classes. Each class has its own schedule and set of systemd timers:

  • class1 — application data, databases, personal files (default: daily + weekly + monthly)
  • class2 — infrastructure config: Docker stacks, nginx, DNS zones (default: daily + weekly)
  • class3 — large archives: photos, video libraries, media collections (default: monthly)

What runs on the server

fsbackup runs directly on the backup server as the fsbackup system user (UID 993). There is no Docker container. The system consists of:

  • Bash scripts in /opt/fsbackup/bin/ and /opt/fsbackup/utils/
  • systemd service and timer units (one per class and job type)
  • A FastAPI + HTMX web UI (fsbackup-web.service)

What lives where

PathContents
/etc/fsbackup/fsbackup.confMain configuration
/etc/fsbackup/targets.ymlBackup targets
/etc/fsbackup/age.pubage public key for S3 encryption
/var/lib/fsbackup/.ssh/SSH keys
/var/lib/fsbackup/.aws/AWS credentials
/var/lib/fsbackup/log/Job logs
/backup/snapshots/<class>/<target>/ZFS datasets
/var/lib/node_exporter/textfile_collector/Prometheus metrics