Using rear for BMR

For years I used MondoRescue for doing bare metal restores on Linux. Over the years I have had a few issues with it, and finally dropped it. Don't get me wrong, it is still a great piece of software. And one thing I do miss id the intereactive interface, which made cloning servers really simple.

But, I was at a point where I needed to get BMR up and running quick on OEL6, and was not successful with Mondo at the time. So after googling a while I came across rear (Relax and Recover). I started using  it worked for the most part. I did have a couple of issues, but the rear community was expedious in  helping me out. I even got to chat with Dag Wieers, which was pretty cool. I have been using his repos for years.

To get it working, you can download the latest rpm from http://relax-and-recover.org/download/ , just download the RHEL version for OEL. There are many options for where and how to make the recovery arvhives. I personally just write to an NFS share. Here is a sample local.conf file for writing ISOs to an NFS share.

OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL="nfs://server_name/rear/"
NETFS_KEEP_OLD_BACKUP_COPY=1
ONLY_INCLUDE_VG=( vg00 )
Since I have worked with HP-UX for years, I still name the local drives VG as vg00. I an not a fan of the long default name, ie, VolGroup00. The above will take a full backup of vg00 and store a boot ISO and a tar of your backup data. It also keeps one backup copy. I mainly do this in the event that I need to go back a little further for a restore. But, in the event of a catastrophe, you can boot from the ISO and be to the point you were at when you last made a recovery archive.

Making a backup is simple. You just run the following command.

rear -v mkbackup
And that is pretty much it. Rear also adds a kernel to grub so that you can boot into it and perform the restore. So if you have a need for BMR for fast recoveries. I highly recommend rear. My only con at this point is that I wish there was an option during the process that you could change the ip address of the server during restore. This can probably be done, but I have not spent much time on it at this point. I really want to figure it out, so a new blog post may be on the way soon.

If you have any experience with Mondo or rear, drop me a comment. I am really interested in learning how others are using these tools in their environments.

Comments