How to properly rollback from grub's btrfs-timeshift snapshot?

Hi. I followed this guide to setup the auto hooked btrfs-timeshift snapshots into my grub menu, and it works as a dream, thank you.

However there’s no guideance of how/what to do in case of emergency, when one needed to boot into a previous snapshot from Grub menu. So is there anything special I need to do whenever I boot into a snapshot in order to recover? I’m coming from openSUSE so bear with me, we had to do there something like: sudo snapper rollback, because the snapshot was read only in the moment of booting into it, then after we did that command, we had to reboot and the distro was rolled back and all set.

Is it similiar here, or we just boot into the previous snapshot from Grub and call it a day, and continue working on our machine just like on a regular day?

You can boot off the snapshot and then use timeshift to do the restore. Then reboot.

You should never do this. Timeshift uses read/write snapshots so using your snapshot booted system can have all kinds of negative consequences.

You should boot off the snapshot do the restore and immediately reboot.

2 Likes

Aha! I see, thank you @dalto, much appreciated as always :slight_smile:

A friendly feedback, can we somehow modify the wiki page in order to represent this step also, just in case if anyone else is seeking for the answer, that would be right there included on the wikipage?

I mean, it’s not that straightforward of how to properly do the rollbacks, if I’m here asking about it… :smiley: Nobody asked this question in the past, and I wonder how many people actually screwed up their installs because of unawareness o.O"

1 Like

Hi @Magnus ,
A full dream-story was this for me.
GRUB_SAVEDEFAULT does not work even in ext4 /boot but I’m all ears to hear the solution.

1 Like

Holy moly, so if I’m getting it right, we have to like, rollback twice? Once for setting the snapshot back, and second to set the pacman cache back?
I mean, wouldn’t it be more logical to do a sudo pacman -Syy and skip the double reboots?

Is this still a thing now, or it got resolved? I’m sorry but your reply here confused me now even more than I was… Is it even relevant to my question?

In case you make all steps of Lorenzo’s guide in grub menu you will see all snapshots under

EndeavourOS snapshots

no matter how they were made automatically or manually.
There is not much advantage to use Timeshift restore as opposed to grub snapshot selection.
(and useless without reboot)
In my understanding you change snapshots always through a boot and then you arrive at that moment of the past.
How you refresh package database it is an another question.

1 Like

I have a followup question on the topic.
I also use grub-btrfs + snapper + Btrfs Assistant (after having had a bad experience with TimeShift) for the peace of mind of having the snapshots available at boot. But I am aware that this introduces complexity, and I suspect this rescue system caused (with probably mistakes on my side) my only breakage of EndeavourOS beyond repair in 3 years of use now.

My question is: if I want to ditch grub in the future, what is the procedure to rollback from a snapshot if the system cannot boot properly anymore?
Is it something like renaming the @/.snapshots/XXX/snapshot as @ from a chroot?

I’m also using grub with btrfs, btrfs-assistant, snapper-support btrfs-maintenance and grub-btrfs. I like the way it works even though i may not have an in-depth knowledge of everything. I use it and i can boot into a snapshot and i can roll back to a previous snapshot. I have no intention of switching to systemd-boot because i have no issues using grub. I don’t use timeshift and never have although i have tried it briefly to see how it looks and works. I’m not sure what the procedure for rolling back on systemd-boot is other than through btrfs-assistant. If it can’t boot I think you can arch-chroot on the live ISO and do it. I think @dalto can answer this question the best.

If your system is bootable and you want to rollback:

  1. Mount the root of your btrfs partition
  2. Rename @ to @-old
  3. Take a snapshot of the snapshot you want to restore to @
  4. Move any nested subvolumes of @-old into @
  5. arch-chroot into @
  6. Run reinstall-kernels
  7. Exit the chroot
  8. Reboot

It is worth noting that Btrfs Assistant can do steps 1-4 for you via a GUI if you prefer.

If your system is not bootable, boot off an ISO and then follow the above steps.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.