Timeshift & grub-btrfs.path

This is kind of what Timeshift (btrfs) restore does. And specifying the subvolid, or the subvol (name), do the same thing in this case. With Timeshift, it’s a little cleaner, and /etc/fstab (and /boot/grub/grub.cfg) remain unchanged.

When you Timeshift restore, I believe, you can think of it as essentially just renaming the subvolumes.

I actually used the restore last week, here’s what it looked like after:

sudo btrfs sub list /                                                                                              ✔
ID 256 gen 708845 top level 5 path timeshift-btrfs/snapshots/2024-05-29_15-03-50/@
ID 257 gen 703221 top level 5 path timeshift-btrfs/snapshots/2024-05-29_15-03-50/@home

 ...
 ... 

ID 710 gen 703218 top level 5 path timeshift-btrfs/snapshots/2024-05-28_12-46-50/@
ID 711 gen 703217 top level 5 path timeshift-btrfs/snapshots/2024-05-28_12-46-50/@home
ID 714 gen 709006 top level 5 path @home
ID 715 gen 709005 top level 5 path @
ID 716 gen 708845 top level 5 path timeshift-btrfs/snapshots/2024-05-31_00-11-45/@
ID 717 gen 704395 top level 5 path timeshift-btrfs/snapshots/2024-05-31_00-11-45/@home

The first snapshot pair, used to be the regular subvol names: @ and @home. It also gets the Timeshift comment: Before restoring '2024-05-29_12-46-50' (so you can always go back). But those subvol names are now on ID 714 & 715.

<rant>
In that video, there’s a lot of terminology, and things he gets wrong in that video. Some are minor like calling it deduplication, that’s something else entirely. It’s copy on write (CoW), which is also why everything seems almost instant for these commands. He also goes on to say things like, “I don’t trust it’s (btrfs’s) striping capability”. It’s been stable for many years! But I could go on about a lot misinformation here.

Also, In his snapshot restore example, he used @home. But for @, there are more steps.
</rant>

Timeshift’s default is read/write snapshots, and many people do not prefer this. The package extra/grub-btrfs is not part of Timeshift. But it detects snapshots, and let’s you boot them. This is a part that can possibly create a mess, especially if you continue booting into these snapshots moving forward. (It will appear to work, and I’ve used it for emergencies… With care!).

But it’s easy to set them as read only though with just:

sudo btrfs prop set /mnt/timeshift-btrfs/snapshots/<SNAPSHOT>/@ ro true
sudo btrfs prop set /mnt/timeshift-btrfs/snapshots/<SNAPSHOT>/@home ro true

Is this all another tangent from moving your volumes to another drive? Because this doesn’t exactly help you move anything across filesystems.

2 Likes