Cannot Configure Timeshift With BTRFS

I am trying to use timeshift for backups on Fedora Workstation 42 (setup with default disk partitioning with encryption). Since snapshots are the main selling point of BTRFS, tried to use the BTRFS mode for timeshift; however, it refuses to complete the setup process. Does anyone know why or is there something additional I must do?

Timeshift requires that your BTRFS subvolumes follow a particular naming convention, see Supported System Configurations: “Only Ubuntu-type layouts with @ and @home subvolumes are supported”.

Does your subvolume layout match those expectations?

I am not sure whether default fedora has any layouts. Can you tell me how to check it.

AFAIK, Fedora names its BTRFS subvolumes fedora and home by default. In any case, Fedora’s default is definitely not @ and @home, so unless you changed that during installation, I am afraid it is not going to work.

You can check your layout on the commandline:

~ ❯ sudo btrfs subvolume list /
ID 256 gen 52751 top level 5 path fedora
ID 257 gen 52751 top level 5 path home
ID 258 gen 52715 top level 256 path fedora/var/lib/libvirt
ID 259 gen 52544 top level 256 path fedora/var/lib/portables
ID 260 gen 52544 top level 256 path fedora/var/lib/machines

Apparently, I use the same subvolume names on my systems as Fedora’s default, though I use the advanced partitioning in Anaconda.

Instead of Timeshift, Fedora works well with BTRFS Assistant, available in the repos.

1 Like

Hi.
I’ve been using TimeShift for snapshots for a long time. There are many guides online for changing the btrfs subvolumes from / and /home to @ and @home. The easiest way to create it is with blivet-gui, installing from a netinstall ISO.
However, I would like to add that a timeshift or snapper snapshot does not include the ext4 /boot partition. So snapshots, unlike in the Debian/Ubuntu world, are often useless and inconsistent.

Regards

I hope I understand it right; but, does not they have a point? If the snapshots do not include the kernel and stuff needed to boot, would not they make the system less stable, especially on a encrypted setup?

Hello @ahmutkadim

Just a quick note regarding system snapshots and recovery:

Snapshots are primarily a feature of the Btrfs filesystem. As far as I know, having the /boot partition formatted as Btrfs is not officially supported (and usually unnecessary) on Fedora.
I also run my systems encrypted (using BitLocker and LUKS2) and, despite being a relatively inexperienced user, I ended up with a standard, reliable setup: /boot is on ext4 and the rest is encrypted.
I use Timeshift on all my Fedora installations:

  1. Dual boot PC: Windows 11 Pro / Fedora 42 WS
  2. Dual boot Laptop: Windows 10 Pro / Fedora 42 WS
  3. Old Laptop: Fedora 43 WS

Timeshift can still be useful even if you haven’t made major changes, particularly if you mess up a few settings or configuration files that could make the system unstable.
However, I’m aware of Timeshift’s limitations, and I try to stick to the standard configuration of this excellent Linux system. For standard recovery, Fedora’s default approach is often superior:
You automatically have three previous kernel versions and a rescue kernel installed. These, in my opinion, are far more valuable and robust than Timeshift for dealing with updates or driver issues.

Hope this helps!

Hey @wkmaurom ,

Thanks for your helpful reply. The thing I like about timeshift and rsync is that it can take the snapshot of the whole system and restore it fairly easily. I am still new to the BTRFS thing and while it looks cool on the surface, I believe its limitation is that it can only take snapshot of your data, not where you are booting from. You have mentioned having 3 kernels / rescue kernel installed. Does switching to them on an emergency involve offline setup with a live USB?

Thanks,

Hello @ahmutkadim
By default, without modifying the settings, the system keeps the last 3 installed kernels and the rescue kernel. These initramfs are stored in the /boot partition along with other related files.
To boot into one of the installed kernels or from the rescue you have to select it during startup in grub.
Timeshift used in rsync mode might also create a copy of this partition in addition to the Btrfs volume with the / (root) and /home subvolumes.
To use Timeshift snapshots in Btrfs mode, you should install the subvolumes naming them @ and @home.
Here’s an example with my initramfs:

mauro@fedora:~$ ls -lh /boot/init*
-rw-------. 1 root root 127M 12 set 06.55 /boot/initramfs-0-rescue-59819e6a9e97483ebd3a54391db6ae43.img
-rw-------. 1 root root  65M 12 set 06.55 /boot/initramfs-6.16.7-200.fc42.x86_64.img
-rw-------. 1 root root  66M 24 set 01.40 /boot/initramfs-6.16.8-200.fc42.x86_64.img
-rw-------. 1 root root  42M 27 set 09.07 /boot/initramfs-6.16.9-200.fc42.x86_64.img
mauro@fedora:~$ 

After the suggestion of snapper and btrfs assistant, I have decided to try it out; however, for some reason, btrfs assistant cannot see my subvolumes so I can (in theory) take snapshots but cannot revert to them. Should I put another post for this?

Note: I am using Fedora Workstation 42 with default disk layout (encrypted setup)