Page 1 of 1

Your thoughts on Snapper

PostPosted: Sep 2nd, '18, 09:59
by brm
Guys, I confess to being a Rosa Desktop user for some years now. But things change. I have not been a fan of urpm and noted that Mageia had implemented a dnf package manager. This appeals to me. It has wider support in the Linux community. This is a good thing. But so is Snapper and the ability to take snapshots of your system for testing and upgrading purposes. What do you think of this technology? Do you think it can be used in Mageia? I have played with snapper but find it difficult to use. OpenSuse have built it into their desktop and made it user friendly.
Can this happen in Mageia or is it just a matter of using currently available tools and good how-to? My experience is mid-level linux destop user - not a developer.

Re: Your thoughts on Snapper

PostPosted: Sep 3rd, '18, 10:50
by morgano
Welcome brm :)
If you like, present yourself here

---

urpmi is still the standard package management tool in Mageia 6, but dnf can also be used. The plan is to switch to dnf as default in Mageia 7.

---

GUI for snapshots would be convenient yes.
However CLI tools are a bit more resilient to errors - when we foul up so far the desktop can't come up ;)

I see snapper is packaged - at least in Mageia 6
I have never used snapper nor btrfs yet, but there are tutorials available of course, i.e https://www.linux.com/learn/how-easily- ... es-snapper

Depending on what you read, btrfs development is not progressing well an di feel its future to me uncertain, so i am still using ext4 partitions, plus LVM to bring me sizing flexibility and snapshots.

Diskdrake in Mageia installer and control centre can set up LVM but for managing snapshots I use command line.

Re: Your thoughts on Snapper

PostPosted: Sep 3rd, '18, 11:17
by Bequimao
Hi,

Welcome to the forum and our community!

I am using btrfs and snapper on my root filesystem in openSUSE style and dnf as package manager for quite some time now, and I will not miss it.

There are still some differences to openSUSE:
I have to control the high-water mark and delete some snapshots manually. I did not figure out, how to get the btrfs and snapper daemons working.
Unlike openSUSE there is no boot into a read-only snapshot. When I need to go back to a snapshot with # snapper rollback, grub2 does not boot due to the change of the default subvolume. Then I have to chroot into the filesystem and run grub2-install, recreate the initramdisk ( # mkinitrd ..) and grub.cfg ( # grub2-mkconfig).

Give it a try!
Best regards,
Bequimão

Re: Your thoughts on Snapper

PostPosted: Sep 3rd, '18, 11:22
by morgano
Wow, that snapper tool is really awsome, must try it some day!
https://youtu.be/9H7e6BcI5Fo?t=414

@Bequimao, please file bugs for your findings so this can be polished.

Re: Your thoughts on Snapper

PostPosted: Sep 3rd, '18, 11:40
by brm
Yes it has a lot of potential for Desktop users - unlike some other high value software which is good for Enterprise, but not so valuable for us... eg Containers. You may correct me but there must be a lot of Snapper tools that are in use. It would be nice to try and integrate these with Mageia. I find the Arch Linux Snapper how-to a bit complex ... I need user friendly.
I tried to do a Snapper rollback using another distro. It booted ok but I seemed to be in an orphan root filesystem and could not do all the usual things with Snapper. So I still have no success with it yet.

Re: Your thoughts on Snapper

PostPosted: Sep 3rd, '18, 11:46
by brm
morgano wrote:Depending on what you read, btrfs development is not progressing well an di feel its future to me uncertain, so i am still using ext4 partitions, plus LVM to bring me sizing flexibility and snapshots.


Ok .. that is a shame. It fills a gap that enables us to keep our systems up to date, and yet restore it to a working operation if there is a failure. I wish the Open Source mob could pull together for something that does this.

Re: Your thoughts on Snapper

PostPosted: Sep 4th, '18, 17:08
by jiml8
Snapper looks very cool. Having a gui makes things convenient, unless of course your system is hosed to the point where the gui won't start.

I have used a backup mechanism (described here: viewtopic.php?f=41&t=5957 ) since before there was a snapper. This mechanism is not original with me, but I do believe that snapper also uses this system, placing a gui over the top of it. This mechanism provides all the capabilities snapper provides, but you have to set it up and you control it with the command line. It will also work if you must boot into your system using a rescue DVD or USB stick, and also works if the rescue system is not the same distro as that which you are fixing.

This system is platform agnostic. Its advantage is that it works pretty much regardless of how torn up your system is. Also, since it is scripted, you have complete control over what gets backed up, and how it is backed up. Its disadvantage is that there is no gui; you have to know some shell scripting to set it up and you have to know how to use rsync when it comes time to recover.

I have recovered from some simply horrendous mistakes and failures, quickly and without incident, using this mechanism. I once deleted all of /usr/bin by accident (duh!) and had the whole system running again within about 20 minutes - the time to boot into a USB stick, unlock the encrypted filesystems, and rsync the current backup of /usr/bin into place. I have several times deleted all my emails by accident when checking email before having enough coffee in the morning. Takes roughly 3 minutes to repair.

I also once had a double hard drive failure, taking out both my system and the local backup of my system (what are the odds... but it was an old SCSI subsystem that was becoming unreliable). For this one, I obtained two SSDs and removed the entire SCSI subsystem (5 drives total), then recovered the system from the second backup of the system that was on my NAS. Took about two hours after the SSDs arrived. Think about that. Complete recovery from a double hard drive failure in two hours after the new hardware was available.

So, Snapper looks very cool. But you should check the documentation to be sure you can use it if your gui is dead. If so, it's packaged and available so go for it. If not, the scripted solution I use is older than snapper, does the same thing, and works very well.

Re: Your thoughts on Snapper

PostPosted: Sep 5th, '18, 14:48
by brm
morgano wrote:Welcome brm :)
If you like, present yourself here

---

urpmi is still the standard package management tool in Mageia 6, but dnf can also be used. The plan is to switch to dnf as default in Mageia 7.

I will watch this with keen interest.
---

GUI for snapshots would be convenient yes.
However CLI tools are a bit more resilient to errors - when we foul up so far the desktop can't come up ;)

I see snapper is packaged - at least in Mageia 6
I have never used snapper nor btrfs yet, but there are tutorials available of course, i.e https://www.linux.com/learn/how-easily- ... es-snapper

Thanks - found this link helpful. I have some difficulty understanding how rollbacks work and how to implement them.

Depending on what you read, btrfs development is not progressing well an di feel its future to me uncertain, so i am still using ext4 partitions, plus LVM to bring me sizing flexibility and snapshots.

Diskdrake in Mageia installer and control centre can set up LVM but for managing snapshots I use command line.

Snapper on Manjaro

PostPosted: Jul 19th, '19, 16:21
by mmm
snapper is cool on Manjaro too. I use BTRfs for some months as my daily driver on an SSD and have zero problems with it. Nice hook to to boot into an old snapshot. forced compression ZStd making it faster than speeding bullet.

would be nice to have snapper in Mageia server edition.

Re: Your thoughts on Snapper

PostPosted: Jan 14th, '20, 14:20
by GabrielLuke
For some directories, openSUSE decided to disable snapshotting, e.g. "/var/log" since reverting logs makes searching for problems difficult. To exclude a path from snapshotting, openSUSE creates a subvolume for that path. You can see all subvolumes of "/" by calling "btrfs subvolume list /".

You may create sub-volumes of btrfs for the directories you want to exclude from snapshotting when using btrfs. Sadly a dedicated command is not provided to convert a subvolume to a directory.

You can exclude directories from snapshoting for all filesystem types by mounting directories.