diff --git a/common/nfs-services-server.nix b/common/nfs-services-server.nix index 3f0d660..14aba77 100644 --- a/common/nfs-services-server.nix +++ b/common/nfs-services-server.nix @@ -133,15 +133,16 @@ in echo "Attempting incremental send from $(basename $PREV_LOCAL) to ${standby}" # Try incremental send, if it fails (e.g., parent missing on receiver), fall back to full - if btrfs send -p "$PREV_LOCAL" "$SNAPSHOT_PATH" | \ + # Use -c to help with broken Received UUID chains + if btrfs send -p "$PREV_LOCAL" -c "$PREV_LOCAL" "$SNAPSHOT_PATH" | \ ssh -i "$SSH_KEY" -o StrictHostKeyChecking=accept-new root@${standby} \ "btrfs receive /persist/services-standby"; then echo "Incremental send completed successfully" REPLICATION_SUCCESS=1 else - echo "Incremental send failed (likely missing parent on receiver), falling back to full send with clone source" - # Use -c to specify clone source, maintaining parent relationship even in full send - btrfs send -c "$PREV_LOCAL" "$SNAPSHOT_PATH" | \ + echo "Incremental send failed (likely missing parent on receiver), falling back to full send" + # Plain full send without clone source (receiver may have no snapshots) + btrfs send "$SNAPSHOT_PATH" | \ ssh -i "$SSH_KEY" -o StrictHostKeyChecking=accept-new root@${standby} \ "btrfs receive /persist/services-standby" REPLICATION_SUCCESS=1