A quick guide to setting up BTRFS Timeshift on Fedora 33

This guide is based on an excellent blog post by Will Mutschler found here.

Timeshift uses a specific subvolume layout when using BTRFS snapshots. Fedora 33 does not follow this layout thus we must edit them slightly.

All we will have to do is to change the subvolume names from the root and /home to @ and @home.

Step 1.

Install Timeshift. Timeshift-autosnap-dnf, and grub-btrfs are also great add-ons to have.

These applications are not available on Gnome-Software store for some reason. either use DNFDragora, KDE Discover, or the terminal,

$ sudo dnf install timeshift timeshift-autosnap-dnf grub-btrfs

Step 2 Use lsblk and blkid to learn the partition layout.

$ sudo lsblk
$ sudo blkid

will output currently installed drives. You will have to find the name of the partition where Fedora is installed.

Step 3 Mount the btrfs top-level root filesystem


$ mkdir /btrfs_pool
$ sudo mount -o subvolid=5 /path/to/fedora/install/partition /btrfs_pool

Step 4 Create @ and @home subvolumes

Using the following commands, we will create the required subvolumes with the appropriate names

$ mv /btrfs_pool/root /btrfs_pool/@
$ mv /btrfs_pool/home /btrfs_pool/@home
$ btrfs subvolume list /btrfs_pool

Step 5 Make changes to fstab

You’ve added new subvolumes, now correct fstab to reflect these changes. Simple change the subvolume names of both / and /root. It should look something like this.

cat /etc/fstab
# UUID=11fa3de5-bfb4-4227-a5ee-d8a3d2d2304a /                       btrfs   subvol=@,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async,x-systemd.device-timeout=0      0 0
# UUID=7d52fc6e-8804-4a34-8d16-b185d6d62319 /boot                   ext4    defaults                                                                                                1 2
# UUID=4FD9-A843                            /boot/efi               vfat    umask=0077,shortname=winnt                                                                              0 2
# UUID=11fa3de5-bfb4-4227-a5ee-d8a3d2d2304a /home                   btrfs   subvol=@home,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async,x-systemd.device-timeout=0  0 0
# UUID=11fa3de5-bfb4-4227-a5ee-d8a3d2d2304a /btrfs_pool             btrfs   subvolid=5,ssd,noatime,space_cache,commit=120,compress=zstd,discard=async,x-systemd.device-timeout=0    0 0

Notice the subvol=@ and subvol=@home.

Step 6 Update grub.

We have changed our drive layout and fstab, We should now update Grub to allow the system to boot properly.

$ grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

now reboot the system, and with any luck, the system will start and Timeshift will now allow btrfs snapshots.