Timeshift BTRFS

Is there a risk of breakage using Timeshift restore? What about grub-btrfs?

There are some proper horror stories from as recent as 2024…

Almost a year ago I made this post: https://forum.manjaro.org/t/timeshifts-btrfs-restore-finally-works-with-grub-btrfs/171312

And I have not heard anything saying otherwise.

1 Like

The most important thing is:

Don’t panic.

It’s crucial that you follow the instructions provided by Timeshift precisely when a rollback becomes necessary. Most of the horror stories stem from the user not adhering to Timeshift’s instructions exactly.

The sequence is usually the same:

  • Something breaks, and Manjaro no longer boots, or doesn’t access the GUI, or something similar. Since the user has never been in such a situation before and lacks confidence in the mechanisms, panic sets in.
  • By following instructions or on their own initiative, a rollback is initiated. An older (writable) snapshot is booted. Amazed at how easily this seems to work (Manjaro boots back into the GUI, and everything works), the user forgets (overlooks) to properly complete the initiated rollback (according to the instructions, a new snapshot must be taken immediately before experimenting).
  • Then the user becomes overconfident and tries to reproduce the error. ( You can always roll back, right??? ). But because the rollback wasn’t completed (which Timeshift explicitly requires), the user destroys the current snapshot from which they successfully booted.
  • The next rollback can then only use an older snapshot as a basis. In the worst-case scenario, this happens repeatedly until no working snapshot exists anymore .

Then there’s a huge outcry, and usually only the data can be recovered, but the system has to be reinstalled.
:footprints:
Please note that this description only applies to booting directly into a snapshot. Rolling back via the Timeshift GUI works differently (and without problems).

4 Likes

And how do one complete the rollback, so that the snapshot becomes the root?

Follow the timeshift manual !

Take a snapshot !

Hallo @andreas85

I remember you wrote quite a bit about btfs and timeshift. Understanding the details is certainly important, but my knowledge isn’t advanced enough yet to understand it all. Nevertheless, I use timeshift and snapshots—without them, I would often encounter quite a few problems with Manjaro.
Of course, I take a new snapshot every now and then, and Timeshift does the same.
I will read more and more to understand it better, but I would still like to ask you:
Are there any problems with deleting snapshots? Do you always have to delete the old ones first? I would like to keep the very old ones. Is that a problem? Or can you delete any of them, no matter how new or old they are?
And is it really the case that you must not delete any snapshots immediately after restoring, but must reboot immediately? And why do you have to create a new snapshot immediately after booting a restore?
And where can I find easy-to-understand instructions on this topic, preferably in German?

@Michi I have found that many of these problems can be avoided from the outset by using Snapper and Btrfs-assistant instead of Timeshift.

1 Like

I have often heard that Snapper is the better but also more complex method. For my purposes, however, I believe that Timeshift is the best solution for me. I only back up / (root) and nothing else. Occasionally, I perform a restore if I think I may have damaged something in the system. But I am gradually getting out of the habit of doing this, because it is usually quite possible to repair the system properly.
My wish now is to always use the two functions of Timeshift correctly: when and how to delete a snapshot and what to do after I have performed a restore.

You can delete snapshots in any order!
The result is the same whether you:

  • delete Nr. 39,40,41,42,43,44 … 89 all together
  • or Nr. 39,40,41,42, and later then 43,44 … 89
  • or Nr. 89,39,49,59, and later then the rest

I had to learn two things:

  1. When storage space gets low, you always have to delete the oldest snapshot.
    When deleting snapshots, btrfs can only discard the files that are no longer needed in any of the remaining snapshots. If you delete a “middle” snapshot, most (if not all) of the files will still be needed for the snapshot before or after it. You won’t have freed up much space.

Deleting the oldest snapshot(s) will give you the most space.

  1. If you have hundreds of snapshots, things tend to get confusing (even for btrfs). Deleting intermediate snapshots cleans up btrfs’ metadata and helps you, as the administrator, maintain an overview. Since this is easily forgotten, I automate it all. A forgotten old snapshot once took up over 30% of my hard drive space.
  • So, the strategy for automatically creating snapshots is hourly, plus during updates, and also upon successful boot.
  • And the strategy for deleting them is tiered: daily, weekly, monthly. You’ll have to estimate how long your storage can hold them, whether it’s 2 or 6 months.

For Manjaro (with its large monthly updates), 3 months has worked well for me. (I am using snapper, not timeshift)


With Timeshift, snapshots are never read-only, but always writable. So, when such a snapshot is booted, it inevitably changes. You’re working with this very valuable snapshot. If you break it, it’s gone. Therefore, the very first thing you must do is create a new snapshot. After that, you can do whatever you want.

There is a window of time in which your “irreplaceable” snapshot is vulnerable. That’s how it is with Timeshift. Snapper does it differently.


With Snapper, I do it “very simply”:

  • First, I determine the number of the “good” snapshot I want to roll back to.
  • Then, I create a new writable snapshot from this (read-only) snapshot.
  • (If Manjaro doesn’t boot, I have to perform these two steps from a USB Manjaro installation. Otherwise, it can be done within the system.)
  • Only then do I boot into the new writable (!) snapshot. (you cant boot into any readonly snapshot)
  • If everything went well, after a week I check any remaining orphaned snapshots and delete them.

There is never any risk to the “good” snapshot because it always remains read-only. I can roll back to it 100 times if necessary.

Please note that this description only applies to booting directly into a snapshot. Rolling back via the Timeshift GUI works differently (and without problems).

2 Likes

Hallo Andreas,

Thank you very much for the detailed explanations. It’s completely new to me that my system works in this snapshot after a restore.
Once I’ve done a restore and booted into it, my system works in this snapshot? And when I take a new snapshot, where does my system work? Obviously not in the snapshot I just created? I thought all snapshots were read-only? Is it only the one I just booted into that is not read-only?
Very interesting stuff, I still have a lot to learn.

Yes

No, you work in (A)
But this new snapshot(B) is a possible anchor point for the next, potentially necessary, rollback. Anything you changed up to that point in (A) is irreversible.


This is the difference between Timeshift and Snapper:

  • Timeshift boots into the writable snapshot. Afterwards, you have to save this state.
  • Snapper, on the other hand, copies the saved snapshot and only then boots into the copy.
    Please note that this description only applies to booting directly into a snapshot. Rolling back via the Timeshift GUI works differently (and without problems).
1 Like

Oh, that makes a huge difference.

How long will my system remain in this snapshot (A) that I have restored?

I have often restored a snapshot because I had installed some software that I wanted to get rid of. And then again and again. I had the impression that every time after the restoration, I returned to the same, untouched state of the desired image. How can that be? Will the system eventually leave the state of the image and then no longer write the changes to the image?

Is my system still active in the image of the last restore?

What a mysterious world Btrfs is.

If you manage Snapper together with Btrfs Assistant, it’s just as easy as Timeshift and recovery is less prone to errors.

I find this very true, switched from Timeshift to Snapper with BTRFS-assistant a long time ago and it’s both easier and more reliable.

1 Like

You are making Snapper together with Btrfs Assistant more and more appealing to me.

What do I need to install to experiment with it?

Is it compatible with Timeshift and my existing snapshots?

1 Like

Snapper & Btrfs Assistant:

snapper

snap-pac

btrfs-assistant

and optional

btrfsmaintenance (for automatic Scrub and Balance)

I’ve experimented with Timeshift on and off over the past few years and don’t understand why it comes pre-installed in Manjaro. It’s disappointed me several times. I only use it on my wife’s computer because she prefers ext4.

1 Like

Already installed—just before I start, are the snapper and timeshift snapshots sure not to interfere with each other?

I can’t say anything about that, sorry… maybe @andreas85 ?

Even if they don’t influence each other, it will certainly become extremely confusing. This cannot be recommended to a beginner, and a professional would never even consider it. :footprints:

1 Like

I’ve run both. But there is almost no gain to be running both. (I was just playing.)

They didn’t even interfere, you just have to know what you’re actually doing by taking snapshots managed by different sources. There is only performance and space to be lost by doing this.

I love Snapper, it’s full of features. But it is much harder to use and setup. None of these features are in the completely separate btrfs-assissant GUI either, you need to get at them from the snapper and/or btrfs-tools CLI.

Timeshift is literally a one button click restore.

For first time with btrfs and/or CoW file systems, Timeshift (w/ btrfs) I would highly recommend.

2 Likes