Commit 37e69bb06024

Vincent Demeester <vincent@sbr.pm>
2025-12-20 22:39:20
feat(rhea): add reverse backup from aion for audio content
- Prepare rhea to pull music/audiobooks from aion post-migration - Configure hourly music sync and daily audiobook sync - Keep rhea as backup source after aion becomes primary audio hub Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 973df1c
Changed files (1)
systems
systems/rhea/extra.nix
@@ -46,6 +46,25 @@ let
       servicePort = 6767;
     };
   };
+
+  # Common rsync configuration for aion backups (reverse sync after migration)
+  aionBackupDefaults = {
+    source = {
+      host = "aion.sbr.pm";
+      user = "vincent";
+    };
+    destination = "/neo";
+    delete = true; # Mirror mode: delete files in destination that don't exist in source
+    user = "vincent";
+    group = "users";
+    rsyncArgs = [
+      "--exclude=.Trash-*"
+      "--exclude=lost+found"
+    ];
+    sshArgs = [
+      "-o StrictHostKeyChecking=accept-new"
+    ];
+  };
 in
 {
   imports = [
@@ -607,6 +626,26 @@ in
       enable = true;
       settings.server.port = exportarrServices.lidarr.servicePort;
     };
+
+    # Rsync replica jobs to backup FROM aion (disabled until migration)
+    rsync-replica = {
+      enable = false; # Enable after audio services migration to aion
+      jobs = {
+        aion-music-hourly = aionBackupDefaults // {
+          source = aionBackupDefaults.source // {
+            paths = [ "/neo/music" ];
+          };
+          schedule = "hourly";
+        };
+        aion-audiobooks-daily = aionBackupDefaults // {
+          source = aionBackupDefaults.source // {
+            paths = [ "/neo/audiobooks" ];
+          };
+          schedule = "daily";
+        };
+      };
+    };
+
     # Generate prometheus exporters for all exportarr services
     prometheus.exporters = lib.mapAttrs' (
       name: cfg: