Bacula-users

Re: [Bacula-users] Bacula Rescue CD - Boot Problems

2009-04-22 03:46:43
Subject: Re: [Bacula-users] Bacula Rescue CD - Boot Problems
From: "Mordechai T. Abzug" <morty AT frakir DOT org>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 22 Apr 2009 03:42:21 -0400
On Wed, Apr 22, 2009 at 08:14:37AM +0200, Beorn Harris wrote:

> I have been tearing my hair out over this one...I am trying to test
> a bare metal recovery, but so far have been unable to get the bacula
> rescue CDROM to boot.  I am able to generate the CDROM, and it gets
> past the isolinux selection menu, but fails after initial kernel
> load...

You don't really need the bacula rescue CDROM if you follow three
steps ahead of time:

(1) Run a script that saves partition, volume, and FS info as a client
    run before job.

(2) Make a static bacula client, which you keep with your media:

    archive=/archive; # or whatever
    ./configure --enable-client-only --enable-static-fd && make && 
          cp src/filed/static-bacula-fd $archive

(3) Keep a simple bacula-fd.conf with the static bacula client to use
    as a sample.

The actual recovery goes like this:

(1) Boot the system for recovery with knoppix or equivalent live CD.

(2) Configure the network on the recovery system.  Note that it
    doesn't need to be correct for the system in question -- you can
    pick any available IP, so long as you make a new client stanza on
    the server.  I.e.

    ifconfig eth0 192.168.1.45/24
    route add default gw 192.168.1.1
    echo nameserver 192.168.1.2 >> /etc/resolv.conf
    echo domain mydomain.com >> /etc/resolv.conf

(3) So now create a new client stanza on the bacula server.  Feel free
    to use a short and insecure password -- you're just using this for
    the restore.  Don't forget to reload the config.

(4) Transfer your static-bacula-fd and sample config over the network
    (or on a USB key, or whatever) to the restore system's /tmp.

(5) Start bacula client:
    ./static-bacula-fd -c bacula-fd.conf

(6) run a restore on the server to restore the directory with your
    partition information.

(7) recreate partitions and FSs based on above.

(8) mount partitions relative to /mnt

(9) run a "restore all" on bacula server specifying "where" as /mnt,
    "restore client" as the temp client, and priority as higher (which
    is numerically lower) than any of your backup jobs.

(10) Recreate any directories that are excluded in your bacula config
     (i.e. /proc)

(11) install grub the usual way:
     grub-install --root-directory=/mnt/boot /dev/hda

(12) make sure restore didn't include /mnt in the symlink targets
     (hasn't happened to me, but I think the docs say this is
     possible):
     find /mnt -type l -printf "%l\n" | grep ^/mnt

(13) if restoring from a system with a serial console to a system
     without a serial console, make sure to review grub config

(14) umount partitions

(15) reboot the recovery system and hope for the best!

(16) On the bacula server, remove the temporary client stanza and
     reload the config

- Morty

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users