Use clone source for btrfs send.

This commit is contained in:
2025-11-04 17:51:34 +00:00
parent 6e338e6d65
commit a6c4be9530

View File

@@ -139,8 +139,9 @@ in
echo "Incremental send completed successfully"
REPLICATION_SUCCESS=1
else
echo "Incremental send failed (likely missing parent on receiver), falling back to full send"
btrfs send "$SNAPSHOT_PATH" | \
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" | \
ssh -i "$SSH_KEY" -o StrictHostKeyChecking=accept-new root@${standby} \
"btrfs receive /persist/services-standby"
REPLICATION_SUCCESS=1