Timeshift in grub boot menu?

I was playing around with Garuda Linux and they have ‘Timeshift’ in the grub boot menu so that you can snapshot your system on your drive if it should crash and then you can re-install the last working snapshot from that drive. Is that a possibility or something that can be added to EndeavorOS ? I downloaded and installed Timeshift and make a snapshot of my system. It would be nice to be able to restore it in case of unforeseen crashes from the ‘grub’ boot menu. Has anyone considered this for Endeavor? Just wondering. . .

Rich :slight_smile:

1 Like

Garuda Linux used btrfs as a filesystem. This allows it to use btrfs snapshots via timeshift. You can do the exact same thing with EndeavourOS if you manually partition it that way. You can also use the wiki post on the subject (search btrfs) as a guide.

4 Likes

Another way to do it, perhaps not as efficient is to use your live usb to login, then install timeshift and restore your last snapshot.

1 Like

Timeshift works for ext4 filesystems besides btrfs. . . I was wondering if a grub men entry could be written into the grub so timeshift can be accessed via grub menu in the event of a system crash which I’ve experienced from many OS’s. I had Garuda Linux on the other day and was able to restore the system from the grub menu. The system was set up as a btrfs file system also. But it can also be setup and run on any ext4 files system and restored also in a similar manner. I’m not much at programming but it is a nice feature to have. I’ve have had used about two dozen linux OS’s over the past two decades and have had numerous system crashes for various reasons but could never restore them without re-installing everything from scratch and reformatting the drives. Just wondering. . .

Rich :slight_smile:

1 Like

I haven’t looked at the timeshift-autosnap package from Garuda yet, so I don’t know if it can be adapted for use on ext4. That question could best be asked of @librewish - he’d know :grin:

It sounds neat - but the fact I’d have to use grub to implement it keeps me away :slightly_smiling_face:

The menu entry in grub is generated by grub-btrfs
package

You need btfrs as filesystem and timeshift-autosnap
Also you need timeshift preconfigured to to default to btrfs mode

3 Likes

that’s exactly the backup solution I was looking for :smiley:

Already implemented :wink: with the help of @2000

Configured timeshift to take hourly snapshots and generates grub config file when I have time or before updates or shutdown

2 Likes

But this is with btrfs, isn’t it? The OP seems to want to implement this with EXT4.

Sorry to crush your dreams, but someone has to … :sob: :grin:

Not going to happen for Timeshift’s EXT4 snapshots!

Think about what you’re actually asking. For ext4 snapshots, Timeshift uses rsync to produce copies of your systems root partitions files, not the partition itself; on the same or on other filesystems.

To boot into one of these root-snapshots you’d have to rewrite a whole lot of stuff (e. g. fstab, crypttab, initramfs, …) because all the storage info points to the wrong places. So, you’d have to actively change your backuped files. Where are you going to store the information to revert these changes? In your backup? Is it still a “backup” after this sort of manipulation?
What about (full disk) encrypted systems? How would you manage to boot into a copied root-snapshot but load/keep your not snapshot-ed encrypted /home?
And all of this at such an early boot stage? Grub certainly couldn’t do this. […]

I could go on for hours but I think I made my point :wink: .

There simply are too much variations for getting this to work reliably -and- a lot of pain for nearly no gain for the developer(s).

If you want to be able to boot into snapshots, why not simply use btrfs as your filesystem?

3 Likes

Thank you for the dream crushing.

Would it be possible to live boot, install timeshift, then restore from a snapshot on an ext4 partition?

If so, a hacky workaround could be to add a timeshift ISO to grub to accomplish this. No?

1 Like

Yes. Alternatively use an iso that already have Timeshift on it. I believe Linux Mint’s iso comes with it.

1 Like

There are two ways to do this:
Boot the live ISO, connect to the internet, install Timeshift and restore through the app or you can open the terminal use Arch chroot and after you’ve chrooted simply type timeshift. You then have the options to restore.

3 Likes

Very cool. I was going to pack a custom ISO with timeshift, but arch-chroot makes that pointless. Thanks for the link!

For the record, I’ve never tried EndeavorOS, I found this forum/thread while google searching backup solutions for my operating system.

1 Like

I assume you’re using Arch or Arch-based then?

I installed Arch using Anarchy, and I’m looking at Endeavor now. I’m curious (for a friend) as to how well Deepin DE works here.

Being able to experiment and break stuff (multiple DEs always breaks stuff in my experience) and then revert using timeshift/btrfs seems like a great way to go (preferred over VMs).

I’m also curious about the Endeavor installer. I’d like to do some stuff that’s complicated (for me) on a USB drive: btrfs + full install to USB + full encryption + sda1 formatted either exfat or FAT32 and non-encrypted

I’ve had problems with grub in the past trying to do this, and I’m wondering if Endeavors installer is the solution to this project.