From 9d8e794c244b9a1e45900a72f4c4d8838836dd70 Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 16 Dec 2024 16:07:09 +0100 Subject: [PATCH] Update btrfs-backup script --- nixos/common/software/cli/scripts/btrfs-backup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/common/software/cli/scripts/btrfs-backup.sh b/nixos/common/software/cli/scripts/btrfs-backup.sh index de5a6432..9f9140fe 100755 --- a/nixos/common/software/cli/scripts/btrfs-backup.sh +++ b/nixos/common/software/cli/scripts/btrfs-backup.sh @@ -73,7 +73,8 @@ verify_remote() { # Function to get remote snapshots get_remote_snapshots() { - ssh "$REMOTE_HOST" "find '$BASE_DEST_PATH' -maxdepth 1 -type d -name 'snapshot*' | sort -n" + # ssh "$REMOTE_HOST" "find '$BASE_DEST_PATH' -maxdepth 2 -type d -name 'snapshot*' | sort -n" + ssh "$REMOTE_HOST" "btrfs subvolume list /volume1/ -t | grep `hostname` | grep $SNAPPER_CONFIG" } # Function to cleanup old remote snapshots