From owner-freebsd-questions@FreeBSD.ORG Wed Feb 18 20:27:58 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1DBD1065673 for ; Wed, 18 Feb 2009 20:27:58 +0000 (UTC) (envelope-from dougs@dawnsign.com) Received: from mailfilter.dawnsign.com (cetus.dawnsign.com [216.70.250.4]) by mx1.freebsd.org (Postfix) with ESMTP id A4F068FC1D for ; Wed, 18 Feb 2009 20:27:58 +0000 (UTC) (envelope-from dougs@dawnsign.com) Received: from mailfilter.dawnsign.com (localhost [127.0.0.1]) by mailfilter.dawnsign.com (Postfix) with ESMTP id 42D269594D for ; Wed, 18 Feb 2009 11:57:27 -0800 (PST) Received: from cetus.dawnsign.com (cetus.dawnsign.com [192.168.1.5]) by mailfilter.dawnsign.com (Postfix) with ESMTP id 24A8F95831 for ; Wed, 18 Feb 2009 11:57:26 -0800 (PST) Received: by cetus.dawnsign.com with Internet Mail Service (5.5.2657.72) id <12Q1DK0W>; Wed, 18 Feb 2009 11:57:26 -0800 Message-ID: <3838017D92B3C445BA200CE3B6A821A40A7473@cetus.dawnsign.com> From: Doug Sampson To: "'questions@freebsd.org'" Date: Wed, 18 Feb 2009 11:57:23 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" X-Virus-Scanned: ClamAV using ClamSMTP Cc: Subject: How to create statically linked bacula-fd? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Feb 2009 20:27:59 -0000 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