Bacula-users

Re: [Bacula-users] FreeBSD Bare Metal Recovery

2009-02-18 15:46:55
Subject: Re: [Bacula-users] FreeBSD Bare Metal Recovery
From: Martin Simmons <martin AT lispworks DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 18 Feb 2009 20:42:50 GMT
>>>>> On Wed, 18 Feb 2009 10:16:51 -0800, Doug Sampson said:
> 
> > >>>>> On Wed, 11 Feb 2009 16:34:16 -0800, Doug Sampson said:
> > > 
> > > I poked around some more. I discovered the 'ldd' command 
> > which shows the
> > > libraries used/required by bacula-fd as follows:
> > > 
> > > root@pisces:/root# ldd /usr/local/sbin/bacula-fd
> > > /usr/local/sbin/bacula-fd:
> > >         libz.so.4 => /lib/libz.so.4 (0x280c6000)
> > >         libthr.so.3 => /lib/libthr.so.3 (0x280d8000)
> > >         libintl.so.8 => /usr/local/lib/libintl.so.8 (0x280ea000)
> > >         libwrap.so.5 => /usr/lib/libwrap.so.5 (0x280f3000)
> > >         libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x280fa000)
> > >         libssl.so.5 => /usr/lib/libssl.so.5 (0x281ef000)
> > >         libcrypto.so.5 => /lib/libcrypto.so.5 (0x2822f000)
> > >         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x2837e000)
> > >         libm.so.5 => /lib/libm.so.5 (0x2846d000)
> > >         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x28482000)
> > >         libc.so.7 => /lib/libc.so.7 (0x2848c000)
> > >           
> > > root@pisces:/root# ldd /usr/sbin/chroot
> > > /usr/sbin/chroot:
> > >         libc.so.7 => /lib/libc.so.7 (0x2807b000)
> > > 
> > > The idea is to collect these libraries and archive off-site 
> > along with the
> > > bacula-fd daemon. How do I make those files available to 
> > bacula-fd and
> > > chroot via the Fix-it mode? Do I need to recreate these 
> > directories for each
> > > of the required libraries or can I put these in the /tmp 
> > directory where the
> > > bacula-fd will reside as part of the restore process?
> > 
> > /tmp should be OK as long as LD_LIBRARY_PATH is set (or you 
> > use ldconfig).
> > 
> > __Martin
> 
> I tried 'ldconfig -elf -mv /mnt/disk/tmp' and 'setenv LD_LIBRARY_PATH /tmp'
> to no avail. I  am sure that I really do not understand how to use the
> ldconfig tool. 'man ldconfig' is a bit dense for me. I need something in a
> broader context. Even though I have administered FreeBSD servers for a few
> years now, I am still learning something new every day as I go along.

I'm confused about which directory you are using (is it /mnt/disk/tmp or
/tmp?).  You might need to use the -f option to ldconfig if you are running it
during preparation of the rescue disk.

The LD_LIBRARY_PATH variable should work, unless bacula-fd is installed with
the setuid or setgid bits set.  You could try adding ldd to the rescue disk
and see what it reports at rescue time, with LD_LIBRARY_PATH set.


> I am wondering at this point whether it is possible to create a statically
> linked bacula-fd for future use. I see in the Bacula documentation how to do
> this for Linux distros but don't see anything for the FreeBSD distro. I
> checked 'make config' for the bacula-client port and there isn't any option
> to create such. Is it possible to execute a 'make config' using some
> parameter in order to create a statically linked bacula-fd daemon?

It was possible in the past by adding --enable-static-fd to the configure
args, but I don't know if that still works.


> Or would it be better to install a minimal version of FreeBSD, install the
> bacula-client port, configure the bacula-fd.conf file (or copy that from a
> backup media), start up the bacula-fd daemon, and then run the restore job
> across the network? This would be in the context of a complete restore.

Yes, that is a workable solution too.  I would keep the package file
(i.e. build it with make package) to avoid needing to install any development
tools at recovery time.

__Martin

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users