YA replication fix.

This commit is contained in:
2025-10-22 14:08:28 +01:00
parent a948f26ffb
commit 8ce5194ca9

View File

@@ -121,8 +121,8 @@ in
# Create readonly snapshot
btrfs subvolume snapshot -r /persist/services "$SNAPSHOT_PATH"
# Find previous snapshot on sender
PREV_LOCAL=$(ls -t /persist/services@* 2>/dev/null | grep -v "^$SNAPSHOT_PATH$" | head -1 || true)
# Find previous snapshot on sender (sort by name since readonly snapshots have same mtime)
PREV_LOCAL=$(ls -1 /persist/services@* 2>/dev/null | grep -v "^$SNAPSHOT_PATH$" | sort -r | head -1 || true)
# Try incremental send if we have a parent, fall back to full send if it fails
if [ -n "$PREV_LOCAL" ]; then