Best way to backup and restore my OSS 15.4 OS

I visited https://forums.opensuse.org/showthread.php/492732-how-to-backup-and-restore-OpenSUSE-system, but I’m guessing this info might be too old.

I have 15.4 on an SSD with pre-imminent failure according to the SMART data. I could not do a hardware clone, I assume, because the cloning device could not read it correctly.

Is there a safe way to backup / restore, or at least make a list of all my optional / added apps to a new SSD? Thanks in advance.

Talking about backups will loosen an avalanche of advice, do’s, don’ts, etc. So be prepared.

And, while I did not read that old thread< I do not think it is out of date, because making backups is the same subject since the start of electronic mass-storage.

To begin with, you should think about what “disasters” are threatening you. Then you should develop a backup policy that takes care of those threats. Already with the first step here you will notice that different advice depends on what threads are taken for serious. Let us take your own post, where in the end you talk about a list of installed packages (well you call them by the fashion word app :frowning: ). Surprise for me. but valid. Others will already take a user that deletes/ a file by incident as something the system manager should take precautions against. So there are different approaches, different wishes and thus different solutions.

BTW you whish to have a list of installed packages is an easy one

rpm -qa

will give all RPMs installed (not only by using YaST/zypper, but all)
Look into

man rpm

on how to put more information in that list. I use e.g.

rpm -qa --qf '%{NAME}:%{VERSION}:%{RELEASE}:%{INSTALLTID}:%{SUMMARY}
' | sort

Note that software installed not by RPM (e.g. a builds out of a tarball) is not included of course, you should take note yourself about them.

Some random remarks. When designing your backup policy, you should think about details like: where do I store the backups? On the same system :(, in the same building. Out of the house/office :). And when out of the house, how quick am I able to restore a lost file?

And that brings us to the next, very important aspect. There should be a disaster recovery plan. And that should be tested.

Many go for what they call “cloning”. Probably because they like the word. (BTW, when “cloning” means, making a byte for byte copy of something, that is not always done by these gaudy tools.) And when cloning file systems, or even whole mass-storage devices, that will include copying of UUIDs, which from that moment on are not only not so Unique, but those not Uniques will even be dangerous near to each other. And of course, retrieving a lost user file from such a “clone” may not be something done quickly.

Just a few remarks about an endless subject. And no, they are not specific about LEAP 15.4, because they are at least Unix/Linux general, when not valid for all operating systems.

If your device already has unreadable areas and these areas contain your data, you obviously cannot backup this data. If these areas include filesystem metadata, this may affect a lot of data (which is still there, but not reachable). It is also possible that bad spots are in unused areas.

So before doing anything you really need to understand the actual state of your disk.

I missed more or less that you in fact reported read errors on the device and I took this for a general backup question.

But yes, @avidjaar is of course correct. You should first and foremost try to save as many files as possible from the file system(s) on the device. And when you did not make backups until now (yes, those people do still exist), then you may have a big problem.

There are times the system freezes up completely, so I can’t use mouse or keyboard for a few minutes. Other times, it’s a mixture of freezing / stammering for a few minutes, but I can still reach all of my files from what I’ve experienced when the system is working.

At first, I thought there was something wrong in the BIOS, but same problem occurred. ASUS gave me a heads up to look at the SMART data for this drive (and I’m very happy that comes standard with OSS 15.4).

I will be installing 15.4 on a new drive. Thanks for your replies!

See if you can rsync -av your home directory to an external USB drive.

That will keep all your files and settings.

I would do a “sudo zypper se -si | awk ‘{print $3}’” to get a list of all your installed OpenSUSE packages. Put that also on the external USB drive.

I would also copy /etc/zypp/repos.d to an external USB drive to make sure all you have installed in the list to reinstall.

Now you can be safe changing the drive.

Me - I have an external USB cable to install the old drive on an can fetch old setting from if I need them.

Good to have are a USB to Sata III, USB to m.2 SSD and a USB to m.2 nvme cables.

(I used to have to recover systems for a major retailer - I also had access to the backup drives for files I could not read from the original drive.)

Thanks for the tip!

Symptoms will get worse. Stop using the SSD immediately. You may either clone the partition using dd or mirror the file system using rsync.

The scariest part is that A LOT of files have gone missing from this drive; it was also taking a longer time each time to boot up - and there were apps that didn’t want to close.

Fortunately, I copied my most important personal files to an external SSD before that happened. I can’t find the SMART data from the screen captures for this drive, for example. According to a manufacturer rep, this Leven SSD was “upgraded,” but maintained the old label for some reason; I used this drive for less than a year. Good thing I had it insured.

Right now, I’m using the Leven SSD as external / backup, but I’m wondering how wise THAT is.