I have been using Snapper within my main VM I use for work for some time now. (It gets a dedicated GPU and SSD, so it runs like native.) With a hard drive failure and needing to restore quick, I manually restored the snapshots to @ and @home from another btrfs file system over the network.
I normally have a more streamlined method for other hosts (using Timeshift, or other snapshotting means), but Snapper was in limbo until I mastered it. And I just rebuilt the host way I knew starting with the partitions with fdisk. (A process that has worked countless times with btrfs.)
It all works great! Except for home snapshots..
The one time I messed with my /home config, and I lost all snapshots along with them. And this alone makes me leery to move Snapper to my host system.
So I would like to fix my home snapshots, without destroying the root config and snapshots. (Just for the future, if possible.)
So this is what I have so far..
/etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=5BEB-20F3 /boot/efi vfat umask=0077 0 2
UUID=751920f1-5f97-449d-8dd2-10187991b13b / btrfs subvol=/@,defaults 0 0
UUID=751920f1-5f97-449d-8dd2-10187991b13b /home btrfs subvol=/@home,defaults 0 0
UUID=751920f1-5f97-449d-8dd2-10187991b13b /var/cache btrfs subvol=/@cache,defaults 0 0
UUID=751920f1-5f97-449d-8dd2-10187991b13b /var/log btrfs subvol=/@log,defaults 0 0
UUID=751920f1-5f97-449d-8dd2-10187991b13b /.snapshots btrfs subvol=/@snapshots,defaults 0 0
UUID=a9ddc99c-63fa-454f-9692-a5d3bb0e961a swap swap defaults,noatime 0 0
lsblk -f
AME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
vda
├─vda1 vfat FAT32 5BEB-20F3 299.1M 0% /boot/efi
├─vda2 btrfs 751920f1-5f97-449d-8dd2-10187991b13b 198.6G 18% /mnt
│ /home
│ /.snapshots
│ /var/cache
│ /var/log
│ /
└─vda3 swap 1 swap a9ddc99c-63fa-454f-9692-a5d3bb0e961a [SWAP]
btrfs subvolume list
You can see the root snapshots already working fine.
ID 260 gen 231 top level 5 path @log
ID 261 gen 92 top level 5 path @cache
ID 262 gen 282 top level 5 path @
ID 263 gen 282 top level 5 path @home
ID 264 gen 230 top level 5 path @snapshots
ID 265 gen 82 top level 264 path @snapshots/1/snapshot
ID 266 gen 86 top level 264 path @snapshots/2/snapshot
ID 267 gen 116 top level 264 path @snapshots/3/snapshot
ID 270 gen 229 top level 264 path @snapshots/5/snapshot
ID 271 gen 230 top level 264 path @snapshots/6/snapshot
Everything about the restore from the snapshots is fine, except for:
sudo snapper -c home create -p -d Test
IO Error (.snapshots is not a btrfs subvolume).
I know they were in /home/.snapshots, which of course came over with the restore (as a folder).
I have been going through the Arch Snapper wiki, among other sources, trying to remember what the blank I did there.
I did not want to do this, but just to get home snapshots working again, I tried:
sudo snapper -c home create-config /home
Creating config failed (subvolume already covered).
sudo snapper -c home delete-config
Deleting config failed (deleting snapshot failed).
Edit: Cleaned up garbage