[CentOS] Backup and restore for CentOS 5.5

Mon Oct 3 20:32:49 UTC 2011
Les Mikesell <lesmikesell at gmail.com>

On Mon, Oct 3, 2011 at 3:16 PM, Denis <denis.becker at mnsu.edu> wrote:
> Hi - I have a NFS/NIS server environment running CentOS 5.5 on a Dell
> Optiplex 240. I would like to back it up and then move it to a new
> machine.

You don't mention the type of the new machine.  If it is not identical
hardware you are probably better off installing a new copy of CentOS
on the new machine and then using rsync to copy over any needed data.

> Couple of questions:
> 1. This is an older computer Dell Optiplex 240 that I am unable to
> connect a USB drive to. In the "linux rescue" environment fdisk -l shows
> only /dev/hda but lsusb shows the three partitions that are on the
> drive. I would like to know how to connect the USB drive to the system
> so I can rsync or dd to the drive.

Not sure about that.

> 2. I was going to rsync a backup, excluding /proc, /sys, /dev and /tmp,
>  either to a mounted USB drive or to a remote station. I know how to do
> that but how do I setup the drive up for the restore on the new
> computer. I have google'd but without success. I would think I need to
> format the hard drive, then run the LVM tools (<-very ignorant here),
> and install grub after all the files are in place (maybe mkinitrd too).
> Is there information avaiable to do this or would some be willing to
> provide what I would need to accomplish this.

If you are going to identical hardware, you could use clonezilla to
copy the drive to an image (either local via USB or to a network file
share or an ssh connection) and reverse the process to copy the image
back to the drive on your new machine.   It is not impossible to make
this (or other types of system copies) work on different hardware but
you may have to rebuild the initrd with different driver modules.  And
in any case you will have to reconfigure the network since the MAC
address copied from the old machine won't be correct in the new one.

 Les Mikesell
   lesmikesell at gmail.com