I already have snapper working, with the default settings, which is doing snapshots of root. As I understand, it excludes subvolumes. I’m trying to setup snapshots for my home and storage directories, but I keep getting “Creating config failed (config already exists).”
Current Setup.
Leap 15.5 install. I kept the root partition as default.
I have a BTRFS partition for /home, this partition is old, been used with multiple Linux installs, I just mv the old personal directory by giving it a date, and let the install create the new user. So within the partition there’s folders like this
stephen/…
stephen_2023_11/…
stephen_2021_5/…
stephen_2018_11/…
I also have another BTRFS partition (on spinning rust) which has subvolumes for VM backups, ISOs, and media
I want to be enable snapshots of the BTRFS partitions mounted at /home and /mnt/storage to save myself from some of those accidental deletions and overwrites that occur prior to making my monthly backups to external drives.
When run the command: sudo snapper create-config /home
I get the error message
“Creating config failed (config already exists).”
I understand that I have a configuration for / already, but I want to create these configs for sub directories of root.
How can I get snapper to realize that the directories I’m wanting to create configs for are not already covered by the root config?
Here’s the current /etc/snapper/configs/root
# subvolume to snapshot
SUBVOLUME="/"
# filesystem type
FSTYPE="btrfs"
# btrfs qgroup for space aware cleanup algorithms
QGROUP=""
# fraction of the filesystems space the snapshots may use
SPACE_LIMIT="0.5"
# fraction of the filesystems space that should be free
FREE_LIMIT="0.2"
# users and groups allowed to work with config
ALLOW_USERS=""
ALLOW_GROUPS=""
# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
# directory
SYNC_ACL="no"
# start comparing pre- and post-snapshot in background after creating
# post-snapshot
BACKGROUND_COMPARISON="yes"
# run daily number cleanup
NUMBER_CLEANUP="yes"
# limit for number cleanup
NUMBER_MIN_AGE="1800"
NUMBER_LIMIT="50"
NUMBER_LIMIT_IMPORTANT="10"
# create hourly snapshots
TIMELINE_CREATE="yes"
# cleanup hourly snapshots after some time
TIMELINE_CLEANUP="yes"
# limits for timeline cleanup
TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="10"
TIMELINE_LIMIT_DAILY="10"
TIMELINE_LIMIT_WEEKLY="15"
TIMELINE_LIMIT_MONTHLY="0"
TIMELINE_LIMIT_YEARLY="0"
# cleanup empty pre-post-pairs
EMPTY_PRE_POST_CLEANUP="yes"
# limits for empty pre-post-pair cleanup
EMPTY_PRE_POST_MIN_AGE="1800"
Here’s the BTRFS partitoins
stephen@redacted:/etc/snapper> sudo btrfs fi show
Label: 'OS_2' uuid: c8f485c4-1803-4274-b7e9-ebd91741b5cc
Total devices 1 FS bytes used 17.78GiB
devid 1 size 68.36GiB used 22.05GiB path /dev/nvme0n1p3
Label: 'Home' uuid: dda96a5d-391c-4532-8443-5a1211228b36
Total devices 1 FS bytes used 500.85GiB
devid 1 size 755.53GiB used 559.01GiB path /dev/nvme1n1p2
Label: 'storage' uuid: edba738c-d567-4be0-8262-eb4802684720
Total devices 1 FS bytes used 791.63GiB
devid 1 size 1.15TiB used 795.02GiB path /dev/sdb8
Here’s the root partiton structure
stephen@redacted:/etc/snapper> sudo btrfs subvol list /
ID 256 gen 267015 top level 5 path @
ID 257 gen 267015 top level 256 path var
ID 258 gen 266859 top level 256 path usr/local
ID 259 gen 266995 top level 256 path tmp
ID 260 gen 257323 top level 256 path srv
ID 261 gen 266972 top level 256 path root
ID 262 gen 257323 top level 256 path opt
ID 284 gen 184323 top level 257 path var/lib/machines
ID 286 gen 266926 top level 256 path .snapshots