From 706f46ae773708b7de7f697759748e86c8ac5021 Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Wed, 22 Oct 2025 14:22:39 +0100 Subject: [PATCH] And another replication fix. --- common/nfs-services-server.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/nfs-services-server.nix b/common/nfs-services-server.nix index 6e8e935..dbe44d5 100644 --- a/common/nfs-services-server.nix +++ b/common/nfs-services-server.nix @@ -122,7 +122,8 @@ in btrfs subvolume snapshot -r /persist/services "$SNAPSHOT_PATH" # 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) + # Use -d to list directories only, not their contents + PREV_LOCAL=$(ls -1d /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