Bare Metal Recovery of Linux System Via Bacula
this is the method i used to perform a bare-metal recovery of a kvm virtual linux system. maybe technically is not baremetal, because i used a temporary install to get my partitions setup prior to files restore, but either way this method worked for me:
step 1 - perform a temporary install using a anaconda-ks.cfg file that contains the same partitions sizes and volume group names. this is critical because the grub.conf file that gets reloaded is going to have the old names, and this will cut down on your headaches of getting the restored system up and running. if you can save a copy of the anaconda-ks.cfg file from the /root directory of the subject server, it will be helpful now.
step 2 - boot to rescue mode, chroot to /mnt/sysimage and yum install bacula-client. set the proper password and client name that your bacula director will be expecting of the subject server.
step 3 - on the bconsole, give the command 'restore all'. choose selection "5: Select the most recent backup for a client", and then choose the subject server. bacula will present the most current full backup and then any incremental backups that happened since. 'restore' then drops you to the file selection shell, type 'done' since we have nothing to add or remove since this is a full restore. now you are sent to a list of parameters that you can change before the restore is run, you need to change '9: Where' from /tmp/bacula-restores to /. then type 'yes' to confirm restore job to continue.
NOTES on step 3: if this is a physical to virtual machine conversion, do yourself a favor and unmark these files from the bacula full restore:
/etc/sysconfig/network-scripts/ifcfg-eth* /etc/udev/rules.d/70-persistant-net.rules /boot/grub/device.map
step 4 - wait. you can use the command "stat xxx" (where xxx is the jobid of the restore job) to keep track of progress.
step 5 - when the job finishes, on the subject server, edit the /etc/fstab file. i removed the UUID for boot and replaced it with /dev/vda1, because the UUID no longer matches from the original server. if you want to dig out the new UUID of /boot you can (the command is 'blkid'), but i just gave it the device.
step 6 - reinstall grub with this command: grub-install /dev/vda. delete the file /etc/udev/rules.d/70-persistant-net.rules.
exit chroot, and reboot.