Advantages of Snapper and Rollback
The following article is part of a series of articles that provide tips and tricks for Linux newbies – or Desktop users that are not yet experienced with regard to certain topics. This series intends to complement the special edition #30 “Getting Started with Linux” based on openSUSE Leap, recently published by the Linux Magazine, with valuable additional information.
This article has been contributed by Arvin Schnell, Software Engineer YaST, SUSE.
Snapper is a tool for Linux file system snapshot management.
It creates snapshots of the root file system in openSUSE Leap 42.3. Installing, updating or removing packages automatically triggers an action to create a snapshot. If you have root user privileges, you can view existing snapshots with the command snapper ls. With snapper, as root user you can also manually create and delete snapshots or restore individual files from snapshots.
Snapshots can help your computer to recover from severe system failures, for example, if a system update were to cause a regression in the network stack. For many users such failures are not fixable, especially if network connectivity fails and no help is available from the Internet. Without snapper, you might have to resort to having to reinstall the operating system.
In such a case of severe failure, you can select “Start bootloader from a read-only snapshot” during the boot. The bootloader then presents the list of available snapshots, together with the kernel version and the date of each snapshot. Now you can select a snapshot and boot the system. Since the root file system will be read-only, some services may not work. To permanently use the snapshot and set it to read-write, use the command snapper rollback and reboot.
If you now think snapper is a great tool to use, you are right. However, you should also keep in mind: snapshots come with a slight drawback. They need extra disk space and deleting a file does not free the disk space until also all snapshots containing the file have been deleted. But the good thing is that snapper automatically deletes old snapshots to minimize the risk of running out of disk space.
To take advantage of the snapper tool, you must select Btrfs as the file system to receive the benefit of snapshots. If you want to learn more now about snapper, read this Linux Magazine article.
No comments yet