Switching to 11.2, safety first - which backup option?

I am going to be using the holidays to switch over my laptop from 11.1 to 11.2. However, this laptop is mission-critical, and it’s been in use for years, so I have everything on it, including all the latest 11.1 updates, stuff from non-opensuse repositories, etc.

In case of failure, or in case there is a showstopper in 11.2 I have not yet encountered on my home desktop, I need to be able to go back to the original state with as few headaches as possible.

I’ll obviously backup all my data files (/home, /data, etc.), but can anyone recommend a system backup / restore method? I know of:

HowTo Backup and Restore Images of Partitions…

And

YAST’s System Backup and Restore tools

Neither of which I’ve used in the past.

For my requirements, I don’t care if it takes long to create the backup, but the time it takes to restore and the certainty that my system is restored exactly to where it was are the most important.

Recommendations?

Good timing. I’m about to embark on a similar task over the holidays and have been wondering the same thing.

I was planning to clone my laptop hard disk to another spare disk I have of the same size using clonezilla then do a clean installation of 11.2 on my laptop. If things don’t go well then hopefully I’ll just be able to clone the hard disk back from the clone I previously made.

If there is a better way, I’d love to hear it.

Honestly I don’t hold much regard for backups, except the data backups you have already made, as that is the essential stuff. All the rest is really just applications that need installing. And myself, even after complete format I can have my laptop back to full working form with a couple of hours. The actuall install only takes 20 mins.

I have heard good reports on Clonezilla
Clonezilla

I looked at Clonezilla. Seems like a good tool to use, but there’s no examples on how to backup/restore specific partitions (only whole disks). I’m sure it’s possible, but the Backup Restore Images of Hard Disk Drive Partitions has detailed instructions on how to do specific partitions.

@caf4926: you must be a lucky guy, if you can restore your laptop in a couple of hours. Just running all the system updates takes that long for me. And then I still have to get all the stuff that’s not on repositories: VMPlayer, display driver, Websphere, Weblogic, Tomcat, etc. It’s not pretty.

@suse_tpx60s: I think I’m going to run a partition backup with the instructions from swerdna - using the SystemRescue approach. If you use Clonezilla, let me know how that works out.

Trying to find the right words… I don’t want to be too negative on clonezilla.

It did the job but I still don’t like it too much. The documentation leaves very much to be desired. If there is a compression option, don’t use it. It’s best use is for a backup in case of catastrophic failure on your HD. In this case, a major update, so much will change that you will be better off just using a backup tool for docs etc.

The update to 11.2 should give you no problems. Restoring docs will be quick but you will probably want to take a fresh look at settings with the upgraded opensuse. That means few settings will carry over. Make it easy on yourself.

Whatever you pick, test it first, even if you backup only 1 folder. Make sure you can get that folder back.

Point noted, but the OP’s (and mine) intention of the partition / disk backup here is to be able to go back to the original setup if for some reason 11.2 doesn’t work out.

I’m just taking a closer look at Clonezilla to make sure I understand what’s involved. I’ll let you know how I get on.
I had a brief skim through Swerdna’s method and it looked a little complicated.

I found this video tutorialof cloning / restoring using clonezilla. It looks fairly straight forward and as you can see in the video there is a clear option to choose between cloning / restoring disks or partitions.

EDIT: You can always have a little practice in a VM to get a feel for the process.

I’m still quite satisfied with my custom solution:

On all my systems I have 2 30GB partitions. One containing the current stable release, one containing a Milestone / RC. As soon as the latest goes stable and has proven to be so, the old stable partition becomes the new “factory”. At this very moment my main machine runs 11.2, but the 11.1 install is still there and usable.

I’ve been doing this for years now and there have been many moments it was a true joy to be able to go back where I came from.

I keep daily backups of the whole system for the last 6 days using rsync. This makes it possible to return to a previous state when something has gone wrong. The trick is to use hard links for everything which has not changed, reducing the disk space used. The idea is described here: Heinlein - Professional Linux Support GmbH - Howto: Backups mit rsync (German text). Have a look at the two scripts called backup-rsync and backup-rotate. You may have to adapt them to your needs.

I do a similar thing except use Back in Time which is basically a GUI frontend for rsync. I guess a creating rsync scripts would give you more flexibility but BiT does a good job for simple backup.

What I did when upgrading to 11.2 was pull the HDD out of the laptop and put it in a USB housing. I bought a new HDD (they are cheap!) and installed 11.2 on that. All the data on the old drive is preserved and readily available. Further, I was able to swap the drives around for about a week until I got 11.2 working the way I wanted it (I would put the 11.1 drive in when I went to the office). Sure, the approach costs money, but it sure works well. :slight_smile:

What I did when upgrading to 11.2 was pull the HDD out of the laptop and put it in a USB housing.

Interesting option. But, ahem, I’m not much of a hardware guy. Pulling the drive out of my Toshiba laptop sounds rather scary. And finding a compatible HDD for that laptop, wouldn’t that be a pain, or are those pretty standard now?

rsync option

I use rsync to backup my data files, so I’m somewhat familiar with rsync. But, can you easily restore the / root partition stuff with rsync too? Is that fail safe?

Interesting option. But, ahem, I’m not much of a hardware guy. Pulling the drive out of my Toshiba laptop sounds rather scary. And finding a compatible HDD for that laptop, wouldn’t that be a pain, or are those pretty standard now?

I haven’t had a Toshiba for years, but on my Dell the HDD comes out after you remove two small screws on the bottom of the LT. After sliding it out, there are two more screws to remove the molding that gets mounted on the new HDD. The new one you slide in and secure with the two screws that you initially removed.

The USB housing that I bought has no screws. You slide in the drive and it snaps together. Further, it snaps apart when you need to reverse the whole process. When you plug the USB housing into the the LT, all your old volumes mount up, just like any USB drive. The housing cost $25.

As for the new drive, I just went to Microcenter and bought an arbitrary 2.5 inch SATA drive. I would be a bit surprised if the same strategy wouldn’t work for your Toshiba. Mine was a 500 Gb Western Digital Scorpio Blue, which cost less than $100. It has had the advantage of relieving the disk space constraint I had with the 120 GB drive that it replaced.

i would suggest that you listen to JJMT

i have been using ezswap drawers (i have a tower) to switch between 11.1 and 11.2 untill 11.2 performed according to my standard . now both drives are running on 11.2, one for the work and the other for testing.

Cool - thanks for the tip. I always thought laptop drives are a pain to swap. I’ll have a look at that.

For @suse_tpx60s and anyone who’s interested: I did the following proof-of-concept by using the Backup Restore Images of Hard Disk Drive Partitions method.

  • Backup of the / root partition with partimage as per the instructions
  • Created a Virtualbox vm and restored that partition

Short conclusion: it works, with warnings (see below).

Longer story: restoring into a VM is more complicated than it seems, unless you want to make the VM with the exact same harddrive size as the original. I only wanted to restore the root partition, so I had to configure the VM such that the total number of partitions and the partition names/numbers lined up as on my original, but with different sizes.

From this, I highly recommend NOT doing:


dd if=/mnt/sdb1/backup-hda.mbr of=/dev/sda (DO NOT use this method)

Since that for some reason messed up my partition table - even though I created the partition table with Gparted AFTER I executed the above command. I did not know that was possible.

So, after 2 hrs of restoring my root partition, that partition was no longer recognized. I had to reformat the VM’s disk, create the partition table, restore the partition from USB drive and then use the openSUSE 11.1 “repair” feature to have it create the new boot manager.

After that, I had to do the following:

NOTE: this was only required since I restored to a VM, these steps should not be required if you restore to the original disk.

  1. edit /etc/fstab to modify the drive information from my laptop’s config to the VM’s config
  2. edit /etc/udev/rules.d/70-persistent-net.rules to replace the old eth0 config with the new MAC address and remove eth1
  3. remove the ATI driver with YAST
  4. run sax2 to create a working X environment.

After that, I had a perfect mirror image of my laptop’s root partition in working condition on a VM.

Well yesterday I decided I would upgrade my 11.1 to 11.2. I used clonezilla to clone the partitions (which is quite easy to do). Basically, it creates a separate image file for each partition on your chosen device (in my case a USB HDD). The video tutorial I pasted earlier was quite helpful in familiarising myself with the screens and process. The only difference is you choose to clone a partition instead a disk.

I then decided to wipe and reformat my ext3 home partition (after making a second full back up of it) to ext4. Then as a test I restored the home partition from my cloned images and it all worked very well. The home partition was restored without problems.

I just wish the install of 11.2 was a smooth. That’s for another thread…

On Sun, 20 Dec 2009 22:16:02 GMT, twelveeighty <twelveeighty@no-mx.forums.opensuse.org> wrote:

>
>>
>> What I did when upgrading to 11.2 was pull the HDD out of the laptop
>> and put it in a USB housing.
>>
>
>Interesting option. But, ahem, I’m not much of a hardware guy. Pulling
>the drive out of my Toshiba laptop sounds rather scary. And finding a
>compatible HDD for that laptop, wouldn’t that be a pain, or are those
>pretty standard now?
>
They were pretty standard over 10 years ago when i put a larger disk in
my now antique laptop.
As for painful, that depends on how difficult it is to get to the HD.
It was a real nuisance on that old sony LT.

>>
>> rsync option
>>
>
>I use rsync to backup my data files, so I’m somewhat familiar with
>rsync. But, can you easily restore the / root partition stuff with rsync
>too? Is that fail safe?

On Mon, 21 Dec 2009 03:06:01 GMT, twelveeighty <twelveeighty@no-mx.forums.opensuse.org> wrote:

>
>For @suse_tpx60s and anyone who’s interested: I did the following
>proof-of-concept by using the ‘Backup Restore Images of Hard Disk Drive
>Partitions’ (http://opensuse.swerdna.org/suseimage.html) method.
>
>* Backup of the / root partition with partimage as per the
>instructions
>* Created a Virtualbox vm and restored that partition
>
>Short conclusion: it works, with warnings (see below).
>
>Longer story: restoring into a VM is more complicated than it seems,
>unless you want to make the VM with the exact same harddrive size as the
>original. I only wanted to restore the root partition, so I had to
>configure the VM such that the total number of partitions and the
>partition names/numbers lined up as on my original, but with different
>sizes.
>
>From this, I highly recommend NOT doing:
>
>Code:
>--------------------
>
> dd if=/mnt/sdb1/backup-hda.mbr of=/dev/sda (DO NOT use this method)
>
>--------------------
>
>
>Since that for some reason messed up my partition table - even though I
>created the partition table with Gparted AFTER I executed the above
>command. I did not know that was possible.

That dd command would overwrite the partition table, the MBR and more.
The target was a whole drive (logical or not) - not a partition.
BTW Just what was the command used to create the backup?
>
>So, after 2 hrs of restoring my root partition, that partition was no
>longer recognized. I had to reformat the VM’s disk, create the partition
>table, restore the partition from USB drive and then use the openSUSE
>11.1 “repair” feature to have it create the new boot manager.
>
>After that, I had to do the following:
>
>NOTE: this was only required since I restored to a VM, these steps
>should not be required if you restore to the original disk.
>
>1. edit /etc/fstab to modify the drive information from my laptop’s
>config to the VM’s config
>2. edit /etc/udev/rules.d/70-persistent-net.rules to replace the old
>eth0 config with the new MAC address and remove eth1
>3. remove the ATI driver with YAST
>4. run sax2 to create a working X environment.
>
>After that, I had a perfect mirror image of my laptop’s root partition
>in working condition on a VM.

BTW Just what was the command used to create the backup?

It’s described in the Backup Restore Images of Hard Disk Drive Partitions instructions:


dd if=/dev/hda of=/mnt/sda1/backup-hda.mbr count=1 bs=512