Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Feb 2009 11:57:23 -0800
From:      Doug Sampson <dougs@dawnsign.com>
To:        "'questions@freebsd.org'" <questions@freebsd.org>
Subject:   How to create statically linked bacula-fd?
Message-ID:  <3838017D92B3C445BA200CE3B6A821A40A7473@cetus.dawnsign.com>

next in thread | raw e-mail | index | archive | help
We blew up one of our servers recently and we wanted to restore backed-up
data from a Bacula storage server. The Bacula recovery process states that
one needs to create a statically linked bacula-fd daemon in order to start
the recovery process but it does not offer a how-to for FreeBSD systems--
only for Linux systems. See:

http://www.bacula.org/fr/dev-manual/Disast_Recove_Using_Bacula.html#SECTION0
08233000000000000000

Below is a list of libraries that bacula-fd needs in order to run:

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)

How does one go about creating a statically linked bacula-fd? I've googled
around and am not getting relevant hits. I checked 'make config' and there
isn't any option for creating statically linked file. Could I add one on the
fly at the command prompt? If so, what would be the correct syntax?

Another way to recover would be to archive the libraries off-site and
restore these libraries as part of the recovery process-- putting these
libraries in the same directory as the bacula-fd daemon and running it off
that folder. However, when I attempt that, it complains of missing
libraries. I was told to use ldconfig to add the temporary folder to the
system libraries path but I am not having success there either. This is what
I used:

  ldconfig -elf -mv /tmp

which according to man ldconfig (if I interpret that correctly) appends the
/tmp directory to the existing system libraries path.

Does anyone know how to accomplish either of these two methods?

~Doug



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3838017D92B3C445BA200CE3B6A821A40A7473>