Installation/OS Specific Notes/Installing Amanda on NetBSD

From wiki.zmanda.com
Jump to navigation Jump to search

Installing from pkgsrc

pkgsrc is NetBSD's default package management system. The amanda in pkgsrc-current (as of June 2010) is outdated, version 2.5.2p1, but still functional. But that version lacks a lot of fixes and, perhaps more importantly, features, such as backup to Amazon S3 (introduced in Amanda 2.6).

Building and Installing from Source

./configure works fine, but make fails

Amanda requires gnu make, and will fail if compiling with BSD make. Use gmake instead.

amdump timeout with holdingdisk defined

With the introduction of IPv6 in Amanda, a problem has arisen in some, if not all, NetBSD installations with IPv6 support.

With Amanda 3.1.0, after a successful compilation and installation, amdump may fail to execute if a holding disk is defined.

The problem comes from the fact that, in the default IPv6 compilation of 3.1.0, the chunker component will listen on IPv4, but dumper will try to connect to the IPv6 address, resulting in a timeout (after a default 5 minutes wait for 3 consecutive times) and a backup error.

Removing the holding disk configuration option will result in a good execution of amdump, as the dumper/chunker interface is probably not used.

The most obvious solution to this issue is to use the --without-ipv6 configure option.

./configure --without-ipv6

Or to patch common-src/util.c with the following:

# diff -Naur common-src/util.c.orig common-src/util.c
--- common-src/util.c.orig      2010-06-20 20:36:02.000000000 -0300
+++ common-src/util.c   2010-06-20 20:36:25.000000000 -0300
@@ -1063,14 +1063,9 @@
 #endif

     memset(&hints, 0, sizeof(hints));
-#ifdef WORKING_IPV6
-    /* get any kind of addresss */
-    hints.ai_family = AF_UNSPEC;
-#else
     /* even if getaddrinfo supports IPv6, don't let it return
      * such an address */
     hints.ai_family = AF_INET;
-#endif
     hints.ai_flags = flags;
     hints.ai_socktype = socktype;
     result = getaddrinfo(hostname, NULL, &hints, &myres);

Issues with backup encryption

Until 3.1.0, the http://wiki.zmanda.com/index.php/How_To:Set_up_data_encryption How To won't work with NetBSD (and others BSDs, as far as I can tell) because the amaespipe script calls a 'head' utility that has a different behavior in NetBSD, and will result in an error.

This script has been committed to a new version, using dd instead of head, and should be released with 3.1.1.

Even though, aespipe is not supported in NetBSD, and, even with a pkgsrc-wip version of it, it is still tagged as "Linux-only" in pkgsrc-wip. For that reason, I suppose using amcrypt-ossl (openssl) is a better option at this time, for NetBSD deployments.


One other issue is that the default key-generation procedure:

# taken from the aespipe-README
head -c 2925 /dev/random | uuencode -m - | head -n 66 | tail -n 65 | \
gpg --symmetric -a > ~amanda/.gnupg/am_key.gpg

Will also not work. The 2925 value here is too small. A more manual procedure should work fine, use a bigger value for head, then check the resulting file from uuencode, remove the texts and leave exactly 65 lines of random garbage. Then use the gpg --symmetric on it.

Using amcrypt-ossl doesn't require this key to be generated, and will result in an easier (and probably more concise) implementation on encryption.