diff --git a/nixos/common/software/cli/scripts/btrfs-backup.sh b/nixos/common/software/cli/scripts/btrfs-backup.sh index 606050f3..7a835606 100644 --- a/nixos/common/software/cli/scripts/btrfs-backup.sh +++ b/nixos/common/software/cli/scripts/btrfs-backup.sh @@ -12,14 +12,15 @@ fi SNAPPER_CONFIG="$1" # Get the actual snapshot location from snapper config -SOURCE_PATH=$(sudo snapper -c "$SNAPPER_CONFIG" get-config | grep '^SUBVOLUME' | cut -d'=' -f2 | tr -d '"'| awk {'print $3'}) +SOURCE_PATH=$(sudo snapper -c "$SNAPPER_CONFIG" get-config | grep '^SUBVOLUME' | cut -d'=' -f2 | tr -d '"'| awk {'print $3'}) +echo "SOURCE_PATH: $SOUCE_PATH" if [ -z "$SOURCE_PATH" ]; then echo "ERROR: Could not determine snapshot path for config '$SNAPPER_CONFIG'" exit 1 fi # Convert subvolume path to snapshot path -SNAPSHOT_PATH="$SOURCE_PATH/.snapshots" +SNAPSHOT_PATH="$SOURCE_PATH.snapshots" if [ ! -d "$SNAPSHOT_PATH" ]; then echo "ERROR: Snapshot directory '$SNAPSHOT_PATH' does not exist" exit 1