How to create snapshots in openSUSE with YaST2

Snapshots are a straightforward strategy to roll again configuration errors and different points. With openSUSE, working with snapshots is made extremely simple. Jack Wallen exhibits you ways.


Picture: openSUSE

OpenSUSE is one more excellent Linux distribution that has a lot to supply. Many consider openSUSE is without doubt one of the finest flavors of Linux for enterprise desktop use instances. One of many many causes for that’s the built-in snapshot device made attainable by a mixture of the btrfs file system and the YaST2 snapper plugin.

For many who aren’t as conversant in openSUSE (or SUSE), YaST2 stands for One more Setup Instrument and is a centralized location for the configuration of SUSE and openSUSE. However do not consider YaST2 as simply one other System Settings device, because it’s way more highly effective than that. And since it helps an enormous plugin system, it is attainable to simply increase the characteristic set. However with trendy releases of both openSUSE or SUSE, YaST2 contains the snapper plugin. 

SEE: 5 Linux server distributions try to be utilizing (TechRepublic Premium)

What’s snapper? Snapper is the btrfs snapshot device. By design, snapper is a command-line device. However with openSUSE, YaST2 features a GUI that makes managing snapshots extremely easy.

I wish to introduce you to this device, so you may end up proper at dwelling creating snapshots in your openSUSE desktops.

What are snapshots?

Earlier than we dive into this, you may be questioning simply what are these snapshots I maintain referring to. Consider it this fashion: A snapshot is a second in time on your laptop’s file system that you’ve got saved in case one thing goes flawed. Ought to that inevitability happen, you may roll the file system again to a earlier state. In easiest phrases, it is a backup.

Out of the field, openSUSE is about as much as mechanically create sure snapshots. Whenever you first run the device, you may discover snapshots for moments like:

  • First root filesystem (OS set up)
  • Submit-installation
  • On-line updates

In different phrases, any main occasion will launch the creation of a snapshot. However there may be occasions while you wish to manually create a snapshot. Say, for example, you wish to make a significant configuration change to your system. Earlier than you do this, create a snapshot. Ought to one thing go flawed, you may at all times revert to the snapshot you created earlier than the configuration change.

What you may want

The one factor you may want for it is a working occasion of openSUSE. I will be demonstrating with Tumbleweed (the rolling launch model of openSUSE), however you may choose to go together with Leap (the static launch model). And that is all you want. Let’s examine how this works.

Find out how to create a snapshot with YaST2

Log into your occasion of openSUSE. Click on the desktop menu and kind snapper. Click on the YaST2 – YaST Filesystem Snapshots entry and, when prompted, kind your person password. When YaST2 opens (Determine A), it is best to see a list of all the present snapshots.

Determine A


The YaST2 Snapper device is able to go.

Say, you are about to make a significant configuration change to the system and also you wish to create a snapshot. Click on the Create button. Within the ensuing window (Determine B), give the snapshot a memorable title (you may wish to know precisely which snapshot to decide on if you might want to roll again).

Determine B


Naming your new snapshot.

If you wish to focus a snapshot on a specific person knowledge, you may add the username within the Consumer knowledge area, in any other case, you may go away all the things else clean and click on OK.

Now that you’ve got created a snapshot, let’s try it out. Open a terminal window and problem the command:

sudo contact /and many others/testing

What you have performed there may be create a brand new (empty) file within the /and many others listing named testing. Since this was performed after the snapshot, it needs to be picked up. Let’s discover out.

Choose the brand new snapshot within the itemizing after which click on Present adjustments. Within the new window, it is best to see and many others listed (Determine C).

Determine C


The and many others listing is proven as a result of we made a change inside that listing. 

Choose the and many others entry after which, within the subsequent window, increase it to disclose what has modified for the reason that snapshot was taken. You need to see testing listed (Determine D).

Determine D


Our new testing file is listed as being created after the snapshot was taken.

If you choose that file, you may then click on Take away to delete it.

As an example, nevertheless, that we made a change to the smb.conf file. If we make such a change after which view it within the Chosen Snapshot Overview, we’ll see the change listed (Determine E).

Determine E


I’ve modified the title of the Samba workgroup from WORKGROUP to HIVENET.

Ought to that change have induced issues, you possibly can click on Restore Chosen to revert the change again to the pre-snapshot state.

And that is how simple it’s to handle snapshots on openSUSE. That is a kind of instruments you hope you by no means have to make use of however might be grateful it is there ought to the event come up. 

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the newest tech recommendation for enterprise professionals from Jack Wallen.

Additionally see

Recent Articles


Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox