Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/1.getting-started/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Retention is enforced daily by `fs-retention.sh`, which uses `zfs destroy` to re
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)
- **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
Expand Down
5 changes: 2 additions & 3 deletions content/3.configuration/3.scheduling.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ This reads `fsbackup.conf` and writes `OnCalendar=` drop-ins for each enabled ti
| `CLASS2_DAILY_SCHEDULE` | `fsbackup-runner-daily@class2.timer` |
| `CLASS2_WEEKLY_SCHEDULE` | `fsbackup-runner-weekly@class2.timer` |
| `CLASS2_MONTHLY_SCHEDULE` | `fsbackup-runner-monthly@class2.timer` |
| `CLASS3_DAILY_SCHEDULE` | `fsbackup-runner-daily@class3.timer` |
| `CLASS3_MONTHLY_SCHEDULE` | `fsbackup-runner-monthly@class3.timer` |

Omit a variable (or leave it empty) to disable that timer. For example, to disable daily class3 runs, simply don't set `CLASS3_DAILY_SCHEDULE`.
Omit a variable (or leave it empty) to disable that timer. class3 supports monthly snapshots only — there are no daily or weekly timer units for class3.

## OnCalendar= format

Expand Down Expand Up @@ -69,7 +68,7 @@ systemctl list-timers | grep fsbackup
Timers are enabled/disabled by `fs-schedule-apply.sh` based on which variables are set. To manually disable a timer:

```bash
sudo systemctl disable --now fsbackup-runner-daily@class3.timer
sudo systemctl disable --now fsbackup-runner-monthly@class2.timer
```

To re-enable, set the schedule variable in `fsbackup.conf` and run `fs-schedule-apply.sh`.
14 changes: 7 additions & 7 deletions content/4.usage/1.web-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ sudo journalctl -u fsbackup-web -f

The dashboard shows:

- Last run status for each class (exit code, timestamp)
- Per-target success/failure counts
- Snapshot delta metrics (files transferred, created, deleted, bytes)
- S3 export status
- Last run status per class (exit code from the latest runner run)
- S3 export summary — last run time, objects uploaded/skipped/failed, bytes transferred

## Snapshots

The **Snapshots** page lists all ZFS snapshots, filterable by tier, date, class, and target. Each snapshot links to a file browser backed by the ZFS `.zfs/snapshot/` read-only directory.

## Configuration

The **Configuration** page has two tabs:
The **Configuration** page has four tabs:

- **Volumes** — ZFS pool disk usage (used / free / total)
- **Targets** — all targets from `targets.yml` with their ZFS dataset size
- **Hosts** — remote hosts derived from `targets.yml`, with all their associated targets
- **Targets** — all targets from `targets.yml` with source path, rsync options, and ZFS dataset size
- **Schedule** — all systemd timer schedules; runner schedules sourced from `fsbackup.conf`, fixed timers from their unit files
- **Volumes & Maintenance** — ZFS pool disk usage and S3 bucket object count and total size

## Running jobs manually

Expand Down
11 changes: 8 additions & 3 deletions content/4.usage/2.running-jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,18 @@ sudo -u fsbackup /opt/fsbackup/s3/fs-export-s3.sh
## Checking logs

```bash
# Backup log
tail -f /var/lib/fsbackup/log/backup.log
# Per-class backup logs
tail -f /var/lib/fsbackup/log/backup-class1.log
tail -f /var/lib/fsbackup/log/backup-class2.log

# S3 export log
tail -f /var/lib/fsbackup/log/s3-export.log

# Web UI log
sudo journalctl -u fsbackup-web -f

# Timer run output
# Timer run output (journal)
sudo journalctl -u fsbackup-runner-daily@class1.service -f
sudo journalctl -u fsbackup-s3-export.service
sudo journalctl -u fsbackup-retention.service
```
6 changes: 4 additions & 2 deletions content/6.reference/2.metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ fsbackup emits `.prom` files to `/var/lib/node_exporter/textfile_collector/` for

| Metric | Labels | Description |
|--------|--------|-------------|
| `fsbackup_s3_last_exit_code` | — | Exit code of last S3 export run |
| `fsbackup_s3_last_exit_code` | — | Exit code of last S3 export run (0=success) |
| `fsbackup_s3_last_success` | — | Unix timestamp of last successful S3 export |
| `fsbackup_s3_uploaded_total` | — | Objects uploaded in last run |
| `fsbackup_s3_skipped_total` | — | Objects already in S3, skipped |
| `fsbackup_s3_failed_total` | — | Objects that failed to upload |
| `fsbackup_s3_bytes_total` | — | Bytes uploaded in last run |
| `fsbackup_s3_duration_seconds` | — | Duration of S3 export run |
| `fsbackup_s3_duration_seconds` | — | Duration of S3 export run in seconds |
| `fsbackup_s3_target_last_upload` | `tier`, `class`, `target` | Timestamp of last successful upload per target |
| `fsbackup_s3_target_last_failure` | `tier`, `class`, `target` | Timestamp of last upload failure per target |

## Common rsync exit codes

Expand Down
Loading