How to create snapshots in openSUSE with YaST2

3 years ago 454

Snapshots are an casual mode to rotation backmost configuration errors and different issues. With openSUSE, moving with snapshots is made incredibly easy. Jack Wallen shows you how.

opensuse.jpg

Image: openSUSE

OpenSUSE is yet different outstanding Linux organisation that has plentifulness to offer. Many judge openSUSE is 1 of the champion flavors of Linux for concern desktop usage cases. One of the galore reasons for that is the built-in snapshot instrumentality made imaginable by a operation of the btrfs record strategy and the YaST2 snapper plugin.

For those who aren't arsenic acquainted with openSUSE (or SUSE), YaST2 stands for Yet different Setup Tool and is simply a centralized determination for the configuration of SUSE and openSUSE. But don't deliberation of YaST2 arsenic conscionable different System Settings tool, arsenic it's overmuch much almighty than that. And due to the fact that it supports a immense plugin system, it's imaginable to easy grow the diagnostic set. But with modern releases of either openSUSE oregon SUSE, YaST2 includes the snapper plugin. 

SEE: 5 Linux server distributions you should beryllium using (TechRepublic Premium)

What is snapper? Snapper is the btrfs snapshot tool. By design, snapper is simply a command-line tool. But with openSUSE, YaST2 includes a GUI that makes managing snapshots incredibly simple.

I privation to present you to this tool, truthful you'll find yourself close astatine location creating snapshots connected your openSUSE desktops.

What are snapshots?

Before we dive into this, you mightiness beryllium wondering conscionable what are these snapshots I support referring to. Think of it this way: A snapshot is simply a infinitesimal successful clip for your computer's record strategy that you've saved successful lawsuit thing goes wrong. Should that inevitability occur, you tin rotation the record strategy backmost to a erstwhile state. In simplest terms, it's a backup.

Out of the box, openSUSE is acceptable up to automatically make definite snapshots. When you archetypal tally the tool, you'll find snapshots for moments like:

  • First basal filesystem (OS installation)
  • Post-installation
  • Online updates

In different words, immoderate large lawsuit volition motorboat the instauration of a snapshot. But determination mightiness beryllium times erstwhile you privation to manually make a snapshot. Say, for instance, you privation to marque a large configuration alteration to your system. Before you bash that, make a snapshot. Should thing spell wrong, you tin ever revert to the snapshot you created earlier the configuration change.

What you'll request

The lone happening you'll request for this is simply a moving lawsuit of openSUSE. I'll beryllium demonstrating with Tumbleweed (the rolling merchandise mentation of openSUSE), but you tin opt to spell with Leap (the static merchandise version). And that's each you need. Let's spot however this works.

How to make a snapshot with YaST2

Log into your lawsuit of openSUSE. Click the desktop paper and benignant snapper. Click the YaST2 - YaST Filesystem Snapshots introduction and, erstwhile prompted, benignant your idiosyncratic password. When YaST2 opens (Figure A), you should spot a listing of each the existent snapshots.

Figure A

snappera.jpg

The YaST2 Snapper instrumentality is acceptable to go.

Say, you're astir to marque a large configuration alteration to the strategy and you privation to make a snapshot. Click the Create button. In the resulting model (Figure B), springiness the snapshot a memorable sanction (you'll privation to cognize precisely which snapshot to take if you request to rotation back).

Figure B

snapperb.jpg

Naming your caller snapshot.

If you privation to absorption a snapshot connected a peculiar idiosyncratic data, you tin adhd the username successful the User information field, otherwise, you tin permission everything other blank and click OK.

Now that you've created a snapshot, let's trial it out. Open a terminal model and contented the command:

sudo interaction /etc/testing

What you've done determination is make a caller (empty) record successful the /etc directory named testing. Since this was done aft the snapshot, it should beryllium picked up. Let's find out.

Select the caller snapshot successful the listing and past click Show changes. In the caller window, you should spot etc listed (Figure C).

Figure C

snapperc.jpg

The etc directory is shown due to the fact that we made a alteration wrong that directory. 

Select the etc introduction and then, successful the adjacent window, grow it to uncover what has changed since the snapshot was taken. You should spot investigating listed (Figure D).

Figure D

snapperd.jpg

Our caller investigating record is listed arsenic being created aft the snapshot was taken.

If you prime that file, you tin past click Remove to delete it.

Let's say, however, that we made a alteration to the smb.conf file. If we marque specified a alteration and past presumption it successful the Selected Snapshot Overview, we'll spot the alteration listed (Figure E).

Figure E

snappere.jpg

I've changed the sanction of the Samba workgroup from WORKGROUP to HIVENET.

Should that alteration person caused problems, you could click Restore Selected to revert the alteration backmost to the pre-snapshot state.

And that's however casual it is to negociate snapshots connected openSUSE. This is 1 of those tools you anticipation you ne'er person to usage but volition beryllium thankful it's determination should the juncture arise. 

Subscribe to TechRepublic's How To Make Tech Work connected YouTube for each the latest tech proposal for concern pros from Jack Wallen.

Open Source Weekly Newsletter

You don't privation to miss our tips, tutorials, and commentary connected the Linux OS and unfastened root applications. Delivered Tuesdays

Sign up today

Also spot

Read Entire Article