Find the answer to your Linux question:
Results 1 to 4 of 4
hi everyone! I'm new here and this is my first post... I'll get straight to the point lol well the issue is I need a solution for a problem that's ...
  1. #1
    Just Joined! Mohammed Najem's Avatar
    Join Date
    Mar 2008
    Posts
    0

    Smile Hi n00b here... :)

    hi everyone! I'm new here and this is my first post... I'll get straight to the point lol

    well the issue is I need a solution for a problem that's been plaguing my poor life for a while now... simply put, my manager wants a PERMANENT solution to take an image of Linux/UNIX OS and then restore it on another hardware... just like an ANY 2 ANY restoration... we've already done that on windows, using Netbackup BMR, and it worked fine with a few tweaks... we were able to restore from a windows server image on HP server, to an IBM blade server with different setup completely...

    I know Linux isn't one OS... we're using Red Hat.. Now can someone at least put me on the right track? any help is appreciated and I'm willing to discuss it all... thanks.

  2. #2
    Just Joined!
    Join Date
    Mar 2008
    Location
    Canada
    Posts
    42
    Hey, welcome to Linux Forums. What exact kind of cloning are you trying to do? If you want to do an exact byte-for-byte clone, your source and destination partitions must be the same size. I usually make an image of my operating system like this:
    Code:
    dd if=/dev/sda1 of=/mnt/external-source/my-os.img
    You'll have to repeat this for every partition you need to copy. Then I copy the image(s) onto the destination host (if it's only supposed to be running a single operating system, I boot off a Linux LiveCD first.) Then I do something like
    Code:
    dd if=my-os.img of=/dev/sda1
    etc.

    If you want to simply copy files, that's fairly straightforward, too. Mount the destination partition on your source host, something like this (this example uses NFS):
    Code:
    mount -t nfs 192.168.1.2:/media/partition2 /mnt/pnt
    Then just cp the files, taking care to preserve permissions and symbolic links:
    Code:
    cp -a /* /mnt/pnt/
    You'll probably have to use --exclude-dir on the /dev and other pseudofilesystems, though, and then recreate the nodes with mknod.

    Finally, you don't want to forget about your bootloader... it might already work if you installed it to your root partition and it's been marked 'active'; if it's installed to your MBR, you might have to use dd to copy it:
    Code:
    dd if=/dev/sda of=mbr-of-os.img bs=446 count=1
    Then copy the image to the other computer, and copy it into its MBR:
    Code:
    dd if=mbr-of-os.img of=/dev/sda bs=446 count=1
    Or, you could chroot into your environment and use the 'grub' and 'lilo' installer tools to reinstall it. Or, you could boot off a Linux CD and reinstall the bootloader from there. Or, I could stop making suggestions. :P

    Hope that helped and made some sense to you, sorry if it didn't (it's 3:45 AM here).

  3. #3
    Just Joined! Mohammed Najem's Avatar
    Join Date
    Mar 2008
    Posts
    0
    thanks for the rep...

    honestly i tried all of the above... i have no problem cloning a system image then restoring it on the SAME filesystem and hardware...

    My problem is, i'm restoring a red hat image from an HP server onto a fujitsu-seimens blade server... problem is, the modules for CICSS are different for fujitsu than those of HP... i tried excluding /dev, /etc/, /proc and all other virtual FS... but in vain. I've also modified GRUB to point to the partitions and modified /etc/fstab and others as well...

    i cannot seem to find a universal way of backing up and restoring red hat on another hardware... it's just impossible me thinks...

  4. #4
    Just Joined!
    Join Date
    Mar 2008
    Location
    Canada
    Posts
    42
    Hmm... have you tried creating the image when the source partitions weren't booted? In some cases, I've had less problems if I boot off a Linux install CD (or just a regular LiveCD), then mount network filesystems etc. and then do my cp'ing or dd'ing directly onto the remote filesystem. Things like device nodes will copy perfectly if the operating system isn't booted.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •