Question about what Timeshift restores with UEFI system and BTRFS filesystem

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
greyseal96
Level 1
Level 1
Posts: 4
Joined: Mon Oct 31, 2016 3:07 am

Question about what Timeshift restores with UEFI system and BTRFS filesystem

Post by greyseal96 »

Hello all,

I am curious how Timeshift restores will work with my system configuration which includes UEFI and a BTRFS formatted system partition.

First, my system information:

Code: Select all

OS: Mint 20.3
Kernel: 5.4.0-149-generic x86_64
Disk info:
  GPT with UEFI
  Partitions:
    /sda1: EFI system partition formatted with FAT32 mounted at /boot/efi
    /sda2: swap
    /sda3: System partition formatted with BTRFS with two subvolumes: @ mounted at / and @home mounted at /home
    *Note* Since BTRFS was not the default configuration, I read a guide about how to install Mint 20 with BTRFS and UEFI.  I can't remember where I found the guide, unfortunately, so I can't link it here.  The partitioning scheme above was the recommended layout.
Bootloader: Grub2
Timeshift:  configured to run with BTRFS; @home is excluded from the snapshots
I have installed Mint on a virtual machine to test out some things, including Timeshift. I run Mint 20.3 and use Timeshift on my daily driver and I've been meaning to test out different restore scenarios in case I ever need them. I've been using various distributions, including Arch, so I'm fairly familiar with Linux and system administration. I'm not saying that to flex or anything; just to say that it's OK to get technical.

My question is how do Timeshift restores work given my configuration above? From what I understand of BTRFS, since my EFI system partition is on a separate partition, it will not be included in the snapshots. Is that a problem? It seems like it would be because the ESP won't get restored. If I'm restoring a snapshot after a kernel update or even after an in-place OS upgrade, it seems like the fact that the ESP doesn't get restored would be a big problem.

At the same time, I see in the Timeshift ReadMe on its Github page that it says that UEFI systems are supported. As I've been searching around on the forums and the internet I've also seen that Timeshift has some options to restore GRUB. What I have not been able to find is any sort of recommendation about partitioning schemes which use BTRFS and UEFI and how to set up Timeshift so that restoring a snapshot "just works".

So far, as a test, I did the following:
  1. I made sure that I had a snapshot and then I did a full system update which included a kernel update.
  2. Then, as a test, I modified the text of /boot/efi/EFI/ubuntu/BOOTX64.CSV (I have done something like this before while testing something else so I know that it won't mess up Grub).
    • I wanted to have a modification in my ESP which I knew about so that I could tell what happened with a Timeshift restore.
  3. I rebooted the machine to verify that the boot process worked and also so that the new kernel would be used. The machine came back up without any trouble.
  4. I made sure that the ESP was mounted at /boot/efi and then I restored the snapshot that I took prior to the full system update and rebooted.
    • The machine came back up without any problems.
  5. I checked the file at /boot/efi/EFI/ubuntu/BOOTX64.CSV and my modification was still present.
  6. Once again, I made sure that the ESP was mounted at /boot/efi and I restored the automatic snapshot which was taken prior to the restore, rebooted, and checked the file and nothing had changed.
    • As a note, I never saw any dialogs in Timeshift about where to restore or about bootloader options like the user in this post saw.
From what I understand of BTRFS and the way that snapshots work, this is expected behavior. It seems like other people are using Timeshift with a similar configuration but it seems like nobody is having any trouble with restores. Is their configuration different or are they not testing restores? Or maybe is it not a big deal that my ESP isn't getting restored by Timeshift? Alternatively, should I be reinstalling Grub after a Timeshift restore to make sure that Grub and the ESP get set up correctly?
Last edited by LockBot on Fri Dec 01, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
kato181
Level 9
Level 9
Posts: 2577
Joined: Fri Mar 24, 2017 12:33 am
Location: Frederickton NSW

Re: Question about what Timeshift restores with UEFI system and BTRFS filesystem

Post by kato181 »

First, the info you posted is not your system info. To get the full info you need to open terminal and enter the following command then post the results back here. Timeshift is used to take snapshots of your system and can be used to restore a broken system to it's previous state.

Code: Select all

inxi -Fxz
Locked

Return to “Software & Applications”