Auto-detect BTRFS device instead of hardcoding nvme0n1p3
This commit is contained in:
parent
d7573a3cbd
commit
919caa935d
2 changed files with 5 additions and 3 deletions
|
|
@ -11,7 +11,8 @@ LUKS_DEVICE="/dev/disk/by-id/usb-Seagate_Portable_NT3D9HDX-0:0-part1"
|
|||
LUKS_KEYFILE="/etc/backup-drive.key"
|
||||
LUKS_NAME="backup-drive"
|
||||
BACKUP_MOUNT="/mnt/backup-drive"
|
||||
BTRFS_DEVICE="/dev/nvme0n1p3"
|
||||
BTRFS_DEVICE="$(findmnt -n -o SOURCE /var/home 2>/dev/null | sed 's/\[.*//')"
|
||||
[ -b "${BTRFS_DEVICE:-}" ] || BTRFS_DEVICE="$(findmnt -n -o SOURCE / 2>/dev/null | sed 's/\[.*//')"
|
||||
BTRFS_TOP="/mnt/btrfs-root"
|
||||
SNAP_DIR="snapshots"
|
||||
KEEP_LOCAL=2 # local snapshots (need at least 1 for incremental parent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue