How to restore a dd backup NOT full disk?

  • Hello, I need to restore a backup of my OMV server. I have a system partition backup, so not the entire disk, made with omv backup plugin.

    I used systemrescue with zipgun as per this post.

    It seems to have worked somehow, but I get stuck on boot with these errors:

    It seems not to find the disks (which are obviously connected).

    All the disks are USB connected, except for the system one, which is connected via the internal SATA connector.

    The server is a minipc with intel N100 cpu.

    At the same time, if I browse the system folders once logged in, I see everything where it should be.

    I really don't know what to do to make it work again...

    Could anyone help me? I hope I gave all the needed information
    Thank you

  • Making a dd backup of a system partition does not backup the master boot record. Therefore when such a partition is restored to an otherwise empty disk, it will be non-bootable.


    There are numerous articles that may help you correct the problem, such as this one:


    https://www.cyberciti.biz/faq/howto-copy-mbr/


    I completely avoid problems like this because I dd backup the entire system disk which has only one partition (no swap partition). I generally do not run swap at all as there is adequate memory available (32GB). But I do have a swap file configured, but disabled. I can enable it if and when needed.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Hi, thanks for your answer.
    I indeed regret the decision of backing up only the partition.
    Now I wonder: is it possible to manually recover some configuration files from the backup? I could install omv from scratch and mount the dd backup. Most of the things I would like to recover are docker containers, the omv configuration was quite basic, I may be faster to do them again than to recover them...

  • If all your restored backup is missing is the master boot record, you may be able to insert it onto the disk with the restored partition.


    Restore the MBR of a Linux installation
    As preparation for a restore test, I removed the master boot record (MBR) of a Linux system recently: 1# dd if=/dev/zero of=/dev/sda bs=512 count=1 This…
    cstan.io

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • I have used the procedure detailed here to mount my OMV dd backup images and look around inside of them.


    Can I mount a partition from a full drive image?
    Note: While I agree that this question basically is a duplicate of the above question, I feel @alienth's answer (below) is more concise, so I suggest you take…
    unix.stackexchange.com

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Thank you gderf .

    Lesson learnt.

    I was able to mount the dd backup as an external drive and get some of my configuration files out of it.

    I'm now reinstalling everything from scratch, hoping this is the last time...


    Thanks again!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!