From 6cf0dd838f80dcefc8e13d80723a1fef01c26c5d Mon Sep 17 00:00:00 2001 From: Ian Kluhsman Date: Sat, 11 Apr 2026 10:09:43 -0600 Subject: [PATCH] =?UTF-8?q?docs:=20sync=20with=20v2.0=20=E2=80=94=20class?= =?UTF-8?q?=20schedules,=20web=20UI=20tabs,=20log=20paths,=20S3=20metrics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - getting-started: class2 default schedule is daily + weekly (not just daily) - scheduling: remove CLASS3_DAILY/WEEKLY_SCHEDULE (class3 is monthly only); fix disable example to use a real timer (class2 monthly) - web-ui: update Configuration section to 4 tabs (Hosts, Targets, Schedule, Volumes & Maintenance); update Dashboard description — remove stale per-target delta metrics mention, add S3 export status card description - running-jobs: fix log paths to per-class filenames (backup-class1.log, etc.) and add s3-export.log; add fsbackup-s3-export.service to journal examples - metrics: add fsbackup_s3_target_last_upload and fsbackup_s3_target_last_failure per-target S3 metrics Co-Authored-By: Claude Sonnet 4.6 --- content/1.getting-started/1.index.md | 2 +- content/3.configuration/3.scheduling.md | 5 ++--- content/4.usage/1.web-ui.md | 14 +++++++------- content/4.usage/2.running-jobs.md | 11 ++++++++--- content/6.reference/2.metrics.md | 6 ++++-- 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/content/1.getting-started/1.index.md b/content/1.getting-started/1.index.md index dcf7710..a59e122 100644 --- a/content/1.getting-started/1.index.md +++ b/content/1.getting-started/1.index.md @@ -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 diff --git a/content/3.configuration/3.scheduling.md b/content/3.configuration/3.scheduling.md index 87e3c78..b49e134 100644 --- a/content/3.configuration/3.scheduling.md +++ b/content/3.configuration/3.scheduling.md @@ -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 @@ -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`. diff --git a/content/4.usage/1.web-ui.md b/content/4.usage/1.web-ui.md index f7a48e5..c084554 100644 --- a/content/4.usage/1.web-ui.md +++ b/content/4.usage/1.web-ui.md @@ -19,10 +19,8 @@ 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 @@ -30,10 +28,12 @@ The **Snapshots** page lists all ZFS snapshots, filterable by tier, date, class, ## 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 diff --git a/content/4.usage/2.running-jobs.md b/content/4.usage/2.running-jobs.md index 384982f..c0fb6ac 100644 --- a/content/4.usage/2.running-jobs.md +++ b/content/4.usage/2.running-jobs.md @@ -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 ``` diff --git a/content/6.reference/2.metrics.md b/content/6.reference/2.metrics.md index d58100a..2dd6e05 100644 --- a/content/6.reference/2.metrics.md +++ b/content/6.reference/2.metrics.md @@ -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