How can Timeshift rsync snapshots appears in boot? (BTRFS)

Is it possible to make rsync backups to appears in UEFI boot? I uninstalled timeshift-autosnap.

When I did a “sudo update-grub” appears:

A adicionar entrada de menu para UEFI Firmware Settings …
Detecting snapshots …
Found snapshot: 2024-10-12 17:07:48 | timeshift-btrfs/snapshots/2024-10-12_17-07-48/@ | ondemand | {timeshift-autosnap} {created before upgrade} |
Found 1 snapshot(s)
Unmount /tmp/grub-btrfs.kkxKJYd0Wd … Success

Where is this snapshot? How can I delete it?
Should I uninstall grub-btrfs? Is this?

And another thing:
How to disable automatic creation of snapshots on updates? I want to do it by my self with rsync.

I edited your Title and added BTRFS to it, i hope this is okay.

Probably you know this already, but BTRFS is a advanced filesystem and only for experienced people.

1 Like

Yes, I know this. I already had a problem with it. I had to reinstall my system, but I want to try it again.
I just want to know if rsync snapshots could be added to UEFI boot? And if I uninstall grub-btrfs I disable automatic creation of backups (they are made using rsync, as I configured in Timeshift).

I have no self experience around BTRFS.

But i know that @Aragorn is using BTRFS, and creating Rsync snapshots with Timeshift. Im pretty sure he can gave you the answer on first hands experience, which is always better.

But @andreas85 is also well experienced around BTRFS.

When i look at your Title again, i think you miss “How can timeshift rsync snapshots appears in boot?” Fits better or not?

Question, are you really talking about UEFI Boot or just Grub Bootmanager?

1 Like

Looks good.

Yes, it’s UEFI boot. I installed Manjaro with UEFI.
I add a partition of fat 32, /boot/efi.
And when I did:

$ sudo grub-install
[sudo] password for sergio:
Installing for x86_64-efi platform.
Installation completed. No errors reported.

About timeshift, grub and rw-snapshots

Yes, I use btrfs.

I also regularly have snapper take snapshots every hour…). The same applies to updates with trizen (pacman).
But since I have a special btrfs-layout and have already done several successful rollbacks manually, I prefer to do it manually (my data is too valuable for me to experiment with)

Yes, it is possible to boot btrfs snapshots with grub.

But the method chosen for timeshift makes the hairs on the back of my neck stand up because it violates the specifications of the btrfs developers and the general definition of a snapshot.

Problem 1:

A snapshot is unchangeable (!!!). That is the actual purpose of a snapshot. No matter what happens, the snapshot will never break, what has already been written is firmly cemented.

Problem 2:

In order to boot, Linux needs a writable file system.

Solution:

When rolling back, a new, bootable r/w snapshot must be created from the read-only original snapshot. This new snapshot can then be booted. The original always remains unchangeable (and unchanged). If you do something wrong after booting, you still have the original snapshot (!!!) (I think SUSE does this with snapper, but because of my different btrfs-layout I don’t dare to use it)

What Timeshift does:

To get around the boot problem, timeshift does not make read-only snapshots, but always writable snapshots. This means that an entry in grub is enough to boot from any snapshot.

BUT (!!!) if you boot from such a snapshot, it will inevitably change. If something goes wrong, the snapshot is broken (for good) (Because if the original snapshot can be written to, it is no longer unchangeable. That is not at all the point of a snapshot)

You can read about some of these sad cases here in the forum.

With each rescue attempt, a snapshot became unusable. By the time the user had the idea to read the timeshift instructions again, all of his snapshots had been used up. :cry:

(Yes, I know that the timeshift instructions help to avoid this error. But I think it is a mistake in the design of timeshift to allow this possibility of error in the first place)

:footprints:
You find good Information about Btrfs in the wiki

I think you’re confusing something here.

An rsync-backup of a btrfs-snapshot is not a snapshot itself, and therefore as far as I know is not bootable.
Even if that were possible, it would have the same problem as the timeshift approach described above.

3 Likes

Yes, that’s what I thought. Not possible to boot from rsync backup. I can disable grub-btrfs snapshots in /etc/default/grub/grub-btrfs/config. I was afraid that if I uninstall grub-btrfs I will not be able to boot into my system btrfs, it’s not this.

*I just did a “man grub-btrfs”: it’s for adding btrfs-snapshots to grub menu.

1 Like

No. The package grub-btrfs just detects read/write btrfs snapshots and adds them to the grub menu. You must have a btrfs snapshot, if you are installing a boot entry for it.

sudo btrfs sub list / will show you all the btrfs snapshots you have. The Timeshift GUI will only show you the snapshots its made itself.

It’s not a bad idea, booting into these snapshots requires care without knowing exactly what you are doing. And using the Timeshift restore after booting into these snapshots can make a mess of your file system.

Removing timeshift-autosnap was what you needed. If I had more time I’d see what happens by removing it.

But the hooks for when calling pacman update are all in: /usr/share/libalpm/hooks

The file: 00-timeshift-autosnap.hook is what calls Timeshift for the snapshot upon upgrades. Is that file, or anything like it in that folder?

You can remove that file, but it should not be there if you removed the package. (Or the binary it calls.)

1 Like

@Molski I removed timeshift-autosnap, grub-btrfs and there is no 00-timeshift-autosnap.hook in /usr/share/libalpm/hooks.
Thanks! I think this is ok.

Note: rsync backups and rsync snapshots are different.

If you’re referring to rsync snapshots on the same partition where your main system runs, you can always use rsync to slowly create a modifiable snapshot using hard links (without an atomic solution) and manually restore it, as long as any Linux filesystem supports hard links — not just Btrfs, but also Ext4 or XFS. This isn’t a big issue.

If you want Grub to boot from a rsync snapshot, unfortunately, there is no extra tool that supports that.
However, I know that a new implementation of this would be theoretically possible without a doubt.

I would suggest asking Timeshift maintainers if they are interested in adding Grub boot support for rsync snapshot.

2 Likes

You can open, browse and delete these files via right-click on it inside Timeshift.

Just switch the snapshot type from rsync to btrfs in the Timeshift wizard/settings. You’ll be all set for what you want.

Don’t see why there is so much text above, or I don’t get the issue, sorry tldr :stuck_out_tongue:

1 Like

@Zesko
It’s a rsync snapshot in another partition with Timeshift. . This is what is not possible.

Anyway I learned more about btrfs.

Is what?

@soundofthunder
Uninstall grub-btrfs to not search for btrfs snapshots and add them to boot.

Are you a mod now?

No - they’ve reached Trust Level 3:

Users at trust level 3 can…

Recategorize and rename topics

Access a secure category only visible to users at trust level 3 and higher

Have all their links followed (we remove automatic nofollow)

TL3 spam flags cast on TL0 user posts immediately hide the post

TL3 flags cast on TL0 user posts in sufficient diversity will auto-silence the user and hide all their posts

Make their own posts wiki (that is, editable by any TL1+ users)

Daily like, edit, and flag limits increased by 2×

Admins can change these thresholds by searching for TL3 in site settings.

3 Likes

I haven’t discovered how to do that; at least not with any intention. My presumption was that it’s automatic.

If that presumption was accurate, then maybe the wording could be better to avoid confusion. :man_shrugging:

1 Like

Mods have this little green shields under their portrait. :shield:

2 Likes