Major improvements to borgbackup configuration for better reliability and maintainability: **Shared staging directory:** - Use single /btrfs-subvolumes directory (was /subvolumes-{onsite,offsite}) - Eliminates redundant path suffixes in archive structure - Archive paths now semantic: /btrfs-subvolumes/srv-forgejo clearly indicates BTRFS subvolume content without redundant backup job metadata **Defense-in-depth protection:** - Layer 1: Systemd ordering - offsite waits for onsite completion - Layer 2: Self-healing preHook - auto-cleanup orphaned snapshots from crashes/power loss - Prevents cascading failures from race conditions or abnormal terminations **Code quality improvements:** - Extract subvolume lists to reduce duplication (DRY principle) - Add /* sh */ syntax hints for proper editor highlighting - Silent operation for consistency with existing hooks - Improved readability with clearer comments and formatting - All lines ≤ 100 characters **Timing:** - Offsite: *-*-* 00:15:00 (daily at 12:15 AM, waits for onsite) - Onsite: hourly (unchanged) |
||
---|---|---|
.. | ||
common | ||
fuchsia | ||
viridian |