Bare Metal Linux Restore

Technical NotesSeveral weeks ago we started seeing some pretty scary errors showing up on the main system disk for our Blackboard server. We had an extra server hanging around, so we decided to move all the data off the failing disk and onto our spare server. The only question was how to make the new server as close to a perfect copy of the old one as possible. Simply restoring all the filesystems failed for a variety of reasons, mostly related to GRUB and the kernel, so I had to find a way of excluding only the files and directories that were tied to the specific model of server.

To do this, I started by installing a minimal copy of RHEL 4, making sure to lay the filesystems out in exactly the same way as they were on the old server. I then went through several experiments, leaving just the bare minimum files and directories required for the hardware and booting, but formatting all other filesystems and restoring the data from our old server. In the end, the below process resulted in system that worked perfectly, and very closely mirrored the original server.

  • I conducted a minimal OS install on the new server, replicating the filesystem layout on the old server.
  • I booted the new server from DVD in rescue mode, allowing it to mount the filesystems in /mnt/sysimage
  • I removed EVERYTHING in every filesystem and directory EXCEPT the following:
  • Everything in /sys
  • Everything in /dev
  • Everything in /proc
  • Everything in /boot
  • /lib/modules
  • /etc/grub.conf
  • /etc/sysconficg/grub
  • /etc/modules.conf
  • /etc/fstab

Next, I went to my backups and restored the entire system to /mnt/sysimage, making sure not to overwrite existing files. We use NetBackup, which defaults to not overwrite, but other systems are not so careful. If you accidentally overwrite the files we excluded from deletion above, your restored system will not boot.

Once the restore was complete, I rebooted the system and it came up pretty much as a carbon copy of the old server. Once it was up and on the network, I ran “up2date -uf” to install the latest version of the kernel and I was done.

Discuss This Article


2 Responses to “Bare Metal Linux Restore”

  1. Dr. David Klein on August 14th, 2008 12:20 am #

    Hi!
    I am going to wordcamp on Saturday, and during Wordcamp, I am going to be leading online wordgames on different people’s blogs.
    They will be silly, fun, low tech games using wordpress blogs.
    Would you like to host a game on your blog?
    Each game takes 15 minutes, and you would need to be able to post the game, and keep track of comments that 15 minutes while you are at wordcamp.
    Go to http://www.bodyabcs.com/bwp/word-games/ to read more about it.

    Much Love,
    dk

  2. André Blanchard on November 20th, 2008 10:36 am #

    Hi,
    You say : I removed EVERYTHING in every filesystem and directory EXCEPT the following : everything in /sys …

    Do you mean you erase from /mnt/sysimage the content of /sys and if so did you got rid of the directory also or do you mean you maked it to not be restore from the backup?

    Thank you for your help

    André


Got something to say?






Post Tags (user submitted): linux restore (10) - restore linux (8) - server (7) - linux bare metal restore (5) - metal linux (4) - netbackup linux restore (3) - bare metal linux restore (2) - restoring linux RHEL4 boot sector from netbackup (2) - bare metal rescue (2) - bare metal restore RHEL (2) - linux bare metal recovery (2) - Bare Metal Restore for MAC (2) - bare metal restore client linux (2) - Linux bare metal (2) - bare linux (2) - bare metal linux (2) - rhel4 bare metal backup (2) - linux baremetal restore (2) - rhel4 restoring the root / filesystem (2) - linux rescue mode netbackup (2) - baremetal linux (2) - rhel5 disk restore (1) - rescue mode rhel in vmware (1) - dump restore system backup RHEL4 (1) - about linux restore system (1) - linux bare metal recovery dvd (1) - linux bare metal recovery to vmware (1) - cd 1 minimal install rhel (1) - how to recover grub in rhel 4 (1) - RHEL netbackup online restoring (1) - what file system not to restore on linux (1) - rhel another server (dump|restore) (1) - what is bare metal mode (1) - linux full system restore of root exclude files bare metal (1) - Vmware not booting up...mounting local filesystem failed (1) - bare metal linux deploy (1) - rhel4 recovery cd (1) - netbackup restore overwrite existing directory (1) - vmware mounting local filesystem failed (1) - linux deployment bare metal -hypervisor (1) - rhel boot backup (1) - linux restore -experts-exchange (1) - linux recsue restore (1) - recover /boot rhel (1) - restoring netbackup files to RHEL 5 (1) - solaris restor different hardware (1) - how to move a linux install to different hardware -windows (1) - restore linux on new disk dump (1) - linux rescue restaure (1) - linux restore with rescue (1) - INSTALL LINUX RESTORE (1) - RHEL 4 recovery using rescue (1) - rhel bare metal dump (1) - bare metal recovery rhel (1) - solaris restore to different hardware (1) - mounting local filesystems failed RHEL (1) - bare minimum linux (1) - netbackup restore linux (1) - How to restore a RHEL Linux server (1) - linux dump restore to move filesystem (1) - RHEL4 recover grub from Boot CD (1) - how to rhel4 recover from cd (1) - system restore for linux (1) - how to restore linux server (1) - linux rhel4 bare metal restore to different hardware (1) - restoring Linux file systems (1) - linux bare copy (1) - restore (1) - bootable disk with netbackup client linux (1) - spiralbound bare metal (1) - restoring rhel (1) - restore rhel 5 linux disk (1) - minimal rhel4 (1) - restoring Linux on new system (1) - linux rescue disk with netbackup client (1) - rhel restore /boot (1) - howto bare metal restore linux with symantec (1) - copying a server linux restore (1) - restore linux to differnt hardware (1) - restoring data from rescue mode rhel (1) - rhel restore grub (1) - rhel rescue mode mount -t smbfs (1) - symantec linux bare metal restore (1) - restoring / file system on RHEL4 (1) - rhel restoring directories (1) - netbackup rhel bare metal restore (1) - restoring linux to new server (1) - rhel restore rescue (1) - restore bare metal linux (1) - bare metal restore of netbackup (1) - recover root linux rhel grub (1) - linux restore to vmware (1) - metal spiral bound (1) - instalar bare metal en netbackup (1) - vmware rhel4 grub not booting (1) - restoring linux to different hardware (1) - linux bare minimum (1) - rhel linux rescue (1) - how to install bare minimum linux (1) - linux restore / (1) - linux restore -x -M (1) - Symantc Bare metal for Linux (1) - netbackup restoring linux (1) - rhel bare metal restore (1) - restore modules RHEL 4 (1) - how to restore linux to different hardware (1) - restore rhel (1) - linux restoring (1) - linux restore file and hang at grub (1) -