Commit 762a8006108a

Vincent Demeester <vincent@sbr.pm>
2026-01-28 14:46:24
feat(aion): split restic backups into daily and weekly
- Daily backup: org files + documents (frequently changing) - Weekly backup: photos backups, lidarr, audiobookshelf (larger/stable) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 80da9a3
Changed files (1)
systems
systems/aion/extra.nix
@@ -189,9 +189,39 @@ in
       };
     };
 
-    # Restic backup to aix (off-site backup)
+    # Restic backup to aix (off-site backup) - daily for org and documents
+    restic.backups.aix-daily = {
+      user = "vincent";
+      repository = "sftp:vincent@aix.sbr.pm:/data/backup/restic/aion";
+      passwordFile = config.age.secrets."restic-aix-password".path;
+
+      paths = [
+        "/home/vincent/desktop/org" # Org files (<1GB)
+        "/neo/documents" # Personal docs rsynced from rhea (~113GB)
+      ];
+
+      # Daily backup for frequently changing org files
+      timerConfig = {
+        OnCalendar = "daily";
+        Persistent = true;
+        RandomizedDelaySec = "30m";
+      };
+
+      pruneOpts = [
+        "--keep-daily 14" # Last 2 weeks
+        "--keep-weekly 8" # Last 2 months
+        "--keep-monthly 12" # Last year
+      ];
+
+      extraBackupArgs = [
+        "--exclude-caches"
+        "--exclude='.sync-conflict-*'"
+        "--verbose"
+      ];
+    };
+
+    # Restic backup to aix (off-site backup) - weekly for large datasets
     # Note: Photos are already rsync'd to aix daily via aix's pull job
-    # This backup focuses on critical versioned data only
     restic.backups.aix-critical = {
       user = "vincent";
       repository = "sftp:vincent@aix.sbr.pm:/data/backup/restic/aion";
@@ -201,8 +231,6 @@ in
 
       paths = [
         "/neo/pictures/photos/backups" # Immich database dumps only (~100MB, versioned)
-        "/home/vincent/desktop/org" # Org files (<1GB)
-        "/neo/documents" # Personal docs rsynced from rhea (~113GB)
         "/var/lib/lidarr" # Lidarr database and config (~4.6GB)
         "/var/lib/audiobookshelf" # Audiobookshelf database and config (~30MB)
       ];