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