Btrfs snapshots with snapper, with easy rollback

Dear communitiy

I would like to present my project about manjaro and btfs.
It is a collection of scripts, to set up a system with btrfs, automatic snapshotting, and easy rollback.

When I switched to a rolling release, I felt that I need a solution for an easy recovery from any system breakage.
I chose btrfs, and I imagined a setup, when a rollback to a previous working state is just as easy as selecting the right snapshot from the grub menu.
I was already aware of tools that connects grub and btrfs snapshots, but I wanted to have a complete setup just like OpenSuse has.
I watched videos on this topic from Nick: https://www.youtube.com/watch?v=-fT92-jGniI . He stated that you cannot do the OpenSuse like setup in Manjaro.
I decided to build a collection of scripts, to achieve the same functionality.
I have little spare time, but after a year of hard work, I managed to get the right flow done.
Now I have my main computer Manjaro running with this setup since 6 months, without any problem.
I switched from Ubuntu after 14 years, and I use this computer for the 8 hours everyday work (and the my personal projects also).
I also have my 3 kids laptop set up this way, and these are also working properly.

I created a github page for these scripts, and if anyone interested, feel free to try it out. I did my best to have a clean documentation.

Best,
Roti

3 Likes

Isn't that what this does:

Repository      : community
Name            : snap-pac
Version         : 2.3.1-1
Description     : Pacman hooks that use snapper to create pre/post btrfs snapshots like openSUSE's YaST
Architecture    : any
URL             : https://github.com/wesbarnett/snap-pac
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : snapper  pacman  btrfs-progs  procps-ng
Optional Deps   : None
Conflicts With  : None
Replaces        : None
Download Size   : 14.96 KiB
Installed Size  : 31.00 KiB
Packager        : NicoHood <nicohood@archlinux.org>
Build Date      : Sat 30 Mar 2019 11:36:11 AM CDT
Validated By    : MD5 Sum  SHA-256 Sum  Signature

Yes, my scripts also installs that tool. And do many more settings, to end up an easy-to-rollback system.

ohh well its great that you are okay with using snapper

but just want to know

have you tried timeshift-autosnap
and
grub-btrfs ?

While timeshift-autosnap could do nearly the same as snap-pac, grub-btrfs alone is not enough to boot into a snapshot. I also wanted to boot a read-only snapshot, and make the recover from there.

you cannot boot into read only
snapshots unless you make /var as a seperate subvolume or exclude it from snapshot

and

timeshift snapshots just boot directly from grub menu

while those of snapper needs mpdifications

Yes, my script will do the separate /var and all the other modifications to be able to boot into the read-only snapshot.
I will also try timeshift to compare the concept.

1 Like

Forum kindly sponsored by