fix(borgbackup): remove persistent timers to prevent post-resume failures

Removes persistentTimer from all borgbackup services and unnecessary
network-online.target dependencies. Changes fuchsia offsite to 14:00
fixed schedule when system is reliably awake.

Persistent timer catch-ups immediately after system resume caused
failures due to services starting before network/system fully stabilized:
- Onsite: DNS resolution failures (viridian.home.arpa)
- Offsite: BorgBase connection refusals during SSH/borg handshake

Fixed schedules provide reliable backups without catch-up complexity:
- fuchsia offsite: 14:00 daily (typical awake time for desktop)
- viridian offsite: midnight daily (always-on server)
- All onsite: hourly (no catch-up needed)

Offsite services retain wants/after dependencies on onsite completion
to prevent race conditions on shared /btrfs-subvolumes snapshot paths.

Network dependencies removed as fixed schedules run when system is
already stable, eliminating timing issues with network-online.target.
This commit is contained in:
♥ Minnie ♥ 2025-10-14 09:59:27 +08:00
parent 9fb72e762b
commit d21b36a1b0
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
4 changed files with 2 additions and 17 deletions

View file

@ -82,11 +82,9 @@
}; };
environment.BORG_RSH = "ssh -i /etc/ssh/ssh_host_ed25519_key"; environment.BORG_RSH = "ssh -i /etc/ssh/ssh_host_ed25519_key";
compression = "zstd,9";
startAt = "daily"; # Daily at midnight
# Ensure backup runs on next boot if system was asleep compression = "zstd,9";
persistentTimer = true; startAt = "14:00"; # Daily at 2pm when system is reliably awake
# Retention policy for daily remote backups # Retention policy for daily remote backups
prune.keep = { prune.keep = {

View file

@ -13,8 +13,6 @@ in {
# Configure service to wait for completion before marking as active # Configure service to wait for completion before marking as active
systemd.services."borgbackup-job-onsite" = { systemd.services."borgbackup-job-onsite" = {
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
}; };
@ -82,9 +80,6 @@ in {
compression = "zstd,9"; compression = "zstd,9";
startAt = "hourly"; startAt = "hourly";
# Ensure backup runs on wake if system was asleep
persistentTimer = true;
# Match snapper retention policy # Match snapper retention policy
prune.keep = { prune.keep = {
hourly = 24; hourly = 24;

View file

@ -104,9 +104,6 @@
compression = "zstd,9"; compression = "zstd,9";
startAt = "daily"; # Daily at midnight startAt = "daily"; # Daily at midnight
# Ensure backup runs on next boot if system was asleep
persistentTimer = true;
# Retention policy for daily remote backups # Retention policy for daily remote backups
prune.keep = { prune.keep = {
daily = 7; # Keep 7 daily backups (1 week) daily = 7; # Keep 7 daily backups (1 week)

View file

@ -22,8 +22,6 @@ in {
# Configure service to wait for completion before marking as active # Configure service to wait for completion before marking as active
systemd.services."borgbackup-job-onsite" = { systemd.services."borgbackup-job-onsite" = {
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
}; };
@ -108,9 +106,6 @@ in {
compression = "zstd,9"; compression = "zstd,9";
startAt = "hourly"; startAt = "hourly";
# Ensure backup runs on wake if system was asleep
persistentTimer = true;
# Match snapper retention policy # Match snapper retention policy
prune.keep = { prune.keep = {
hourly = 24; hourly = 24;