• Bare Metal Linux Restore

    Several 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.

    This entry was posted on Tuesday, August 5th, 2008 at 12:14 pm and is filed under Data and Technology, Highlights. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 3 Comments

    Take a look at some of the responses we've had to this article.

    1. 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
      Nov 20th
      Reply

      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é

    3. Nov 21st
      Reply

      Hi Andre,

      No, /sys, and everything in it needs to remain, or in your case, /mnt/sysimage/sys. The reason for this is that we do not install a new kernel when doing a bare metal restore. We allow the kernel from the bare-bones install to remain, and upgrade it later using up2date or yum. When you do your restore, make sure that you do not overwrite existing files because you will run into problems with grub if you install your old kernel from backup.

  • Leave a Reply

    Let us know what you thought.

  • Name (required):

    Email (required):

    Website:

    Message:

Visitors have tagged this post: linux restore (28) - bare metal linux (26) - server (18) - Linux bare metal (13) - linux bare metal restore (12) - restore linux (10) - netbackup linux restore (9) - restoring linux (9) - linux restore to different hardware (9) - mounting local filesystems failed vmware (9) - linux system restore (7) - system restore linux (7) - metal linux (6) - linux bare metal recovery (5) - linux dump restore (5) - dump restore linux (4) - vmware mounting local filesystem failed (4) - linux restore /boot (4) - bare metal linux restore (4) - rhel bare metal restore (4) - system restore for linux (4) - restore rhel4 to different hardware (4) - restore linux NetBAckup (4) - linux baremetal restore (4) - bare linux (3) - linux bare metal backup (3) - vmware mounting local filesystems failed (3) - linux system recover /mnt/sys (3) - system restore in linux (3) - restore linux to different hardware (3) - bare metal restore on linux using netbackup (3) - redhat bare metal restore (3) - bare metal restore linux (3) - dump restore grub (3) - solaris Bare Metal Recovery (3) - restore linux in new server (3) - backup linux etc restore different machine (3) - linux restore boot drive (3) - baremetal linux (3) - bare metal rescue (2) - netbackup restore linux (2) - bare metal backup linux (2) - vmware no grub configuration rhel (2) - install bare minimum rhel (2) - bare metal recovery centos (2) - vmware redhat mounting local filesystem failed (2) - netbackup install linux rescue cd (2) - bare minimum linux (2) - bare metal restore grub (2) - netbackup install boot server linux (2) - system directories not to restore RHEL (2) - How to do a system restore in Linux (2) - rescue netbackup cd (2) - dump restore linux rescuecd (2) - linux dump restore howto (2) - linux restore root (2) - linux restore /dev (2) - restore linux different hardware (2) - restore grub directory in centos 5 (2) - bare metal recovery solaris (2) - bare metal recovery (2) - linux dump bootable (2) - redhat linux bare metal restore (2) - Red Hat Enterprise Linux complete system restore from backups (2) - linux restoring kernel (2) - mac bare metal restore (2) - rhel bare metal backup restore (2) - rescue linux netbackup client (2) - bare metal recovery linux netbackup (2) - restore a Linux system with a different device tree (2) - linux restore one file (2) - rhel bare metal backup and restore (2) - how to restore linux (2) - metal spiral bound (2) - red hat enterprise linux 5 dump restore (2) - bare metal restore client linux (2) - restore to a partition from linux dump (2) - restoring linux RHEL4 boot sector from netbackup (2) - solaris 10 bare metal recovery (2) - recovering from netbackup redhat system (2) - dump/restore LInux root filesystem (2) - bare metal restore RHEL (2) - linux restoring (2) - rhel4 bare metal backup (2) - linux rescue mode netbackup (2) - netbackup bare metal restore linux (2) - red hat bare metal backup (2) - vmware restore linux from dump file (2) - rhel4 restoring the root / filesystem (2) - mounting local filesystems failed vmware ("red hat enterprise linux 5 OR rhel5) (2) - linux restore on different hardware (2) - Bare Metal Restore for MAC (2) - bare maetal restore redhat linux (1) - redhat boot mounting local filesystem failed (1) - netbackup restore root file system (1) - restoring redhat on different hardware (1) - linux boot cd with dump and restore (1) - red hat backup restore bare metal (1) - linux restore rescue cd (1) - restore linux hardware (1) - bare metal restore redhat linux (1) - barebone linux backup and restore (1) - vmware linux dump restore (1) - netbackup bare metal solaris manual (1) - linux dump bare metal restore (1) - backup/ restore root partition red hat linux 5 (1) - rhe 5 bare metal backup (1) - bare metal restore red hat enterprise 5 (1) - sysimager restoring system (1) - linux bare metal how to (1) - which files should be excluded for Linux full systems restore (1) - vmware redhat mounting local filesystems failed (1) - linux system backup bare metal restore (1) - red hat linux on vmware not seeing cd drive (1) - netbackup system restore solaris 10 (1) - how to restore /etc for red hat linux (1) - rhel 5 bare metal restore (1) - netbackup restore red hat (1) - netbackup bare metal restore red hat linux (1) - linux, bare metal restore (1) - redhat linux system restore (1) - rhel bare system recovery (1) - minimal linux rescue (1) - rhel 5 bare metal recovery (1) - netbackup recover linux (1) - linux dump restore overwrite all files (1) - /etc/vmware/ restore (1) - recover linux kernel under vmware (1) - dump restore linux rescue (1) - vmware dump restore (1) - restoring grub in rhel 4 (1) - how to do a linux bare metal restore using netbackup (1) - vmware what is the minimal filesystem required (1) - bare metal backup centos (1) - linux restore boot partition (1) - restore redhat enterprise 4 dump (1) - centos mounting local filesystems [failed] (1) - linux recovery using netbackup (1) - restoring to redhat linux server (1) - dump restore vmware (1) - restore one file from dump linux (1) - mounting local file system failed centos vmware (1) - linux bare metal rescue (1) - rhel linux restore different hardware (1) - how to restore linux from backup and rescue disk (1) - backup RHEL system (1) - RHEL system bare metal restore (1) - full backup bare metal centos (1) - system restore in linux red hat 5.0 (1) - dump restore reinstall grub (1) -