Best way to create back up image?

Usually for any OS I use on my PC I’ve used Clonezilla. However, for some odd reason, whenever I use it to create a back up image of an openSUSE install, it fails when I try to restore the image. I’ve never had Clonezilla successfully restore an openSUSE backup for me.

Is there another, trusted way to create a back up image of an openSUSE install that will work when you come to restore it? Many thanks.

On 2012-04-25 18:16, Kinzie wrote:
>
> Usually for any OS I use on my PC I’ve used Clonezilla. However, for
> some odd reason, whenever I use it to create a back up image of an
> openSUSE install, it fails when I try to restore the image. I’ve never
> had Clonezilla successfully restore an openSUSE backup for me.
>
> Is there another, trusted way to create a back up image of an openSUSE
> install that will work when you come to restore it? Many thanks.

I have never used clonezilla, although I wanted to try. It failed, it gave
no reason?

I have use cdrescue, a small linux on cd with some utilities; one of them
is a text based imager, I think it is named partimage.

This imager is somewhat clever in that knows the filesystem and skips empty
sectors, I think. This is the complicated part that may fail. I did
compressed images of ntfs partitions and they failed to restore; plain, not
compressed images worked fine. It did warn that ntfs support was experimental.

There is another method that never fails, though, and that is a straight
image with “dd”. It doesn’t do clever things, it copies all bytes, empty
sectors or not. The result is, of course, bigger, but you might compress it
later.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I used g4l for a long time for full backups with no problems (including
restore). It is a bit outdated now (but still works) and last time I
needed a clone copy I just used plain dd commands without problems.


PC: oS 12.1 x86_64 | Intel Core i7-2600@3.40GHz | 16GB | KDE 4.8.2 |
GeForce GT 420
Eee PC 1201n: oS 12.1 x86_64 | Intel Atom 330@1.60GHz | 3GB | KDE 4.8.2
| nVidia ION
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10 |
xf86-video-geode

If you have one PC and you ae using openSUSE, do you need to clone it anyway? Unless you have made significant changes to the system settings in /, you onlty need to back up /home, mysql and any files you have changed in /etc. If you do get into an unrecoverable situation, all you need to do is reinstall /. That normally takes less time than restoring a clone backup.

On 2012-04-26 10:26, john hudson wrote:
>
> If you have one PC and you ae using openSUSE, do you need to clone it
> anyway? Unless you have made significant changes to the system settings
> in /, you onlty need to back up /home, mysql and any files you have
> changed in /etc. If you do get into an unrecoverable situation, all you
> need to do is reinstall /. That normally takes less time than restoring
> a clone backup.

In my experience, restoring an image is much faster.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I use Clonezilla Live CD (clonezilla-live-1.2.12-10-amd64.iso) to backup/restore OS partitions. I’ve never had any problems restoring an image.

On 2012-04-26 13:26, afshine wrote:
>
> I use Clonezilla Live CD (‘clonezilla-live-1.2.12-10-amd64.iso’
> (http://tinyurl.com/85wn7ha)) to backup/restore OS partitions. I’ve
> never had any problems restoring an image.

It doesn’t backup grub.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I have at least 5 times restored my openSUSE’s / partition with Clonezilla. Every time it was done restoring an image, I just rebooted and was welcomed by openSUSE’s Grub Menu.
May be my setup is different from yours.

============================= Boot Info Summary: ===============================

 => SUSE generic MBR is installed in the MBR of /dev/sdc.

sdc1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  Grub Legacy
    Boot sector info:   Grub Legacy (v0.97) is installed in the boot sector
                       of sdc1 and looks at sector 13084240 of the same hard
                       drive for the stage2 file.  A stage2 file is at this
                       location on /dev/sdc.  Stage2 looks on partition #1
                       for /boot/grub/menu.lst.
    Operating System:  Welcome to openSUSE 12.1
                       "Asparagus" - Kernel ().
    Boot files:        /boot/grub/menu.lst /etc/fstab

=================== sdc1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)

   6.168575287 = 6.623457280    boot/grub/menu.lst                             1
   6.239147186 = 6.699233280    boot/grub/stage2                               1
   8.852539062 = 9.505341440    boot/initrd                                    2
   8.852539062 = 9.505341440    boot/initrd-3.3.3-21-desktop                   2
   8.806911469 = 9.456349184    boot/vmlinuz                                   1
   8.806911469 = 9.456349184    boot/vmlinuz-3.3.3-21-desktop                  1

On 2012-04-26 14:36, afshine wrote:
>
> robin_listas;2458532 Wrote:
>> It doesn’t backup grub.
>
> I have at least 5 times restored my openSUSE’s / partition with
> Clonezilla. Every time it was done restoring an image, I just rebooted
> and was welcomed by openSUSE’s Grub Menu.
> May be my setup is different from yours.

It is documented by clonezilla, they don’t backup grub; they reinstall it.

here


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Your link lead me to Q 117. There is an answer why it happens. Q117/A is attached.

“If it fails, e.g. you are using i686 version of Clonezilla live, while the restored GNU/Linux is amd64 (x86-64) OS, it will fail.”


117. After restoring, grub2 complains "error: no argument specified". Why?

By default when an image is restored, Clonezilla will try to re-run grub-install from the restored GNU/Linux. If it fails, e.g. you are using i686 version of Clonezilla live, while the restored GNU/Linux is amd64 (x86-64) OS, it will fail. Then Clonezilla will use the grub2 comes with Clonezilla live to run grub-install. The version could be imcompatible. E.g. for older version of grub, the syntax is like:
search --no-floppy --fs-uuid --set 857d5af9-23cd-4d9b-908b-cc075e566738
On the other hand, the newer one is:
search --no-floppy --fs-uuid --set=root 857d5af9-23cd-4d9b-908b-cc075e566738
To solve this issue, you can:

    1. Boot the restored GNU/Linux
    2. Enter the command line
    3. Run the following command as root:
       grub-install /dev/sdx
       (Replace /dev/sdx with your harddrive, normally it's /dev/sda. You have to make sure the correct disk name otherwise you might write the boot loader on the wrong disk, and it might fail to boot.) 

Then you can reboot the restored GNU/Linux again, and this warning message should be gone.
//NOTE// You can not run "update-grub" or "update-grub2" to replace the command "grub-install", because update-grub or update-grub2 will only update the config file of grub (/boot/grub/grub.cfg or /boot/grub2/grub.cfg). It won't update the boot loader.

Thank you for your replies. I’ve always taken great care to get the correct architecture download of Clonezilla in the past, and don’t think this could have been the problem. However, maybe I should download a more current version now and try again. It’s a great program usually.

Many thanks again. :slight_smile:

On 2012-04-26 15:46, afshine wrote:
>
> Your link lead me to Q 117. There is an answer why it happens. Q117/A is
> attached.

Yes.

>> “If it fails, e.g. you are using i686 version of Clonezilla live, while
>> the restored GNU/Linux is amd64 (x86-64) OS, it will fail.”

A proper imaging software would not care about the architecture of the
installed system, it just recreates all the bytes in the disk partition
exactly as they were.

Instead, clonezilla is regenerating the grub part because it did not save
it, using its own copy of grub - and of course, it has to be the same arch.

And grub is not imaged because grub is recorded in unused sectors at the
start of the partition, before the real data starts.

This doesn’t happen with a pure dd image.

This rules out clonezilla for me, except for data partitions, and for that
a file copy is better.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Very interesting point. I didn’t know about that. But, are you sure that it uses its own copy? The link you provided says:

By default when an image is restored, Clonezilla will try to re-run grub-install from the restored GNU/Linux.

I am not sure myself, but I understand it as “reinstalling the grub from the restored partition”. It is not so important,
but it is interesting, and I’ll appreciate if you or someone else could throw some more light on the subject. Thanks.

On 2012-04-26 21:26, afshine wrote:
>
> robin_listas;2458608 Wrote:
>> …Instead, clonezilla is regenerating the grub part because it did not
>> save it, using its own copy of grub - and of course, it has to be the same
>> arch…
> Very interesting point. I didn’t know about that. But, are you
> sure that it uses its own copy? The link you provided says:

Sometimes.

Notice the phrase “Then Clonezilla will use the grub2 comes with Clonezilla
live to run grub-install”. In that case it uses its own copy of grub.

>> By default when an image is restored, Clonezilla will try to re-run
>> grub-install from the restored GNU/Linux.
> I am not sure myself, but I understand it as “reinstalling the grub
> from the restored partition”. It is not so important,
> but it is interesting, and I’ll appreciate if you or someone else could
> throw some more light on the subject. Thanks.

Reinstalling is not restoring a backup, is running some program that
recreates what it supposes was the original configuration. It is not the
exact same bytes, which is the point of an image backup.

Sure, clonezilla is good software, it works for many people, but this could
be the cause that it doesn’t work for some. If it had a switch to backup
empty sectors at the beginning of the disk, and skip those after the
initial structures, then it would be safe.

I don’t know why they don’t do that.

Of course, I haven’t read the entire clonezilla documentation, I could be
mistaken.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)