Find right configuration of BTRFS and Snapper to be able to rollback the system without live system

Hello together,

at the moment I am trying to setup a new Manjaro system with btrfs file system and a working snapper configuration.
For this reason I followed this tutorials to setup my system.
https://www.youtube.com/watch?v=YXWI218PXEA&ab_channel=TheDuckChannel
https://www.youtube.com/watch?v=6Lb13cO7h1Y&ab_channel=TheDuckChannel

All showed features are working.
But I do not geht working the rollback feature of snapper/btrfs.
The command seems to work, but if I reboot my system there i can see a new snapshot but all files are the same as beforeā€¦ so the rollback has no effect.
If I boot directly in the readonly snapshot there are all nessessary files modified right.

Do you have a idea what my problem could be?

sudo snapper rollback 1
Ambit is classic,.
Creating read-only snapshot of current system. (Snapshot 7.)
Creating read-write snapshot of snapshot 1. (Snapshot 8.)
Setting default subvolume to snapshot 8.


snapper ls
8+ | single | writeable copy of #1

About snapper, i find the OpenSuse wiki more understandable than the Arch wiki, but thatā€™s meā€¦

That being said, the btrfs layout used by default when installing Manjaro is rather outright compatible with timeshift snapshots. Furthermore, the latter is also shipped in the ISOs, as well as timeshift-autosnap-manjaro, which automatically creates a new snapshot at updates (in case you missed it).

2 Likes

You find good Information about Btrfs in the wiki

and in

Search the forum for btrfs :wink:

1 Like

Hello @andreas85 ,
thank you for your feedback.
I think you are right, there is much information about btrfs and snapper in the forum!

But unfortunately there is no fitting step by step tutorial (beginning at installation and ending at a functional ā€œrollbackā€) to setup a system which is able to rollback through the cli or through a booted snapshot through grub, like opensuse.
But there are many tutorials to setup a system which is able to rollback through a live iso! But that is not the goal of my project!

At the moment I think the problem why my setup is not working is somewhere in my fstabā€¦ because after i fire the rollback command grub is not booting the right readwrite snapshot, but boot the root subvolume which is not changing.
Nick explains this phenomenon here:

For now I unfortunately have not enough spare time to find the right subvolume layout or to find out how to configure grub to boot the default subvolume (snapshot). Maybe in future I come back to snapper if it is better integrated in Manjaro.

@maycne.sonahoz
Thank you for your informations!
I did not know that timeshift is working out of the box with btrfs!
I tried today a setup with timeshift and there I have nothing to do that rollbacks work as desired!

So at the moment I will go with timeshift and btrfs.
Unfortunately timeshift has no feature to compare snapshots (snapper diffā€¦) and no feature to make different intervals for snapping / and /home. I think I will miss this featuresā€¦ but maybe the snapper integration will be more comfortable in future and I will come back then to snapper.

Thank you for your time!

1 Like

On that note, timeshift is more oriented towards system backup, rather than home backup.

1 Like

In the meantime I used the nessessary workload to completely switch to ArchLinux.
I found a very nice manual to build a ArchLinux system with btrfs, snapper and a btrfs layout which works like opensuses rollback. So my requirements I wanted to reach with manjaro are completely fullfilled with ArchLinux nowā€¦
(I made a fork of the easy-arch.sh script to build the Archlinux system without the need of bootstrappingā€¦ maybe I would make a github repo. in futureā€¦)

The manual which I was followed:
https://www.ordinatechnic.com/distribution-specific-guides/Arch/an-arch-linux-installation-on-a-btrfs-filesystem-with-snapper-for-system-snapshots-and-rollbacks

Maybe this manual helps someone to reach the goal with manjaroā€¦
If there is any way to configure the subvolume layout with calamares before the install, that would not be very hard to go!

snapper rollback does not work in Arch based distros, but it is for OpenSuse.
Just use native commands e.g. btrfs and mv to restore snapshot.
Or there is the BTRFS GUI btrfs-assistant that supports btrfsmaintenance, snapper, nest layout and non-nest layout (You should define non-nest layout in the config /etc/btrfs-assistant.conf), simple restoring snapshot in live system, diff viewer and more.

If you want to rollback read-only snapshot (from Snapper) into booting, you should enable grub-btrfs-overlayfs in mkinitcpio hook. It allows you boot any read-only snapshot inclusive the ability grub-btrfs-overlayfs in Grub menu, then restore snapshot in live system on the filesystem Overlays, then reboot.

Have you read my last post?
With the right subvolume layout snapper rollback works on Arch like charme.
Why should it not work on a Arch based distro?

Today, I read the last post.
In the past Iā€™ve tried Snapper rollback on non-nest layout, but it doesnā€™t let me restore non-root subvolume in live system or without live system, it restores only root subvolume without live system. I thought Snapper rollback is unflexible and too narrow with OpenSuSe structure.

Iā€™m happy with grub-btrfs-overlayfs for restoring at booting and btrfs-assistant for any custom layout, they work fine according to my tests.

If youā€™re happy with your solution, thatā€™s fine. :+1:

1 Like

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