Amanda-Users

Re: amanda 2.6.1 - configuration problem ?

2009-02-02 17:36:07
Subject: Re: amanda 2.6.1 - configuration problem ?
From: Jean-Louis Martineau <martineau AT zmanda DOT com>
To: sgw AT amanda DOT org
Date: Mon, 02 Feb 2009 17:24:52 -0500
Hi Stefan,

Try the attached patch.

Jean-Louis

Stefan G. Weichinger wrote:
Greets,

as I start to explore the wonders of opensolaris I have a testbox
running OpenSolaris 2008.11. I installed the amanda-packages from zmanda
 and set up amanda 2.6.1 to give zfs-snapshots a try.

Things work fine when I use a DLE like this:

sun.oops.intern home /export/home zfs-snapshot

Let's call it the "one-line syntax".

When I use the "multi-line syntax":

sun.oops.intern r_storage /export/storage {
zfs-snapshot
}  5

the defined script is not included.

(( sidenote: I wanted to use that syntax to enable tape_splitsize for
the particular DLE, my example here does not contain that line as it
should work like this as well ))

--->

## relevant parts in amanda.conf

define script-tool script_zfs_snapshot {
  comment "zfs-snapshot"
  plugin "amzfs-snapshot"
  execute-where client
  execute-on pre-dle-amcheck, post-dle-amcheck, pre-dle-estimate,
post-dle-estimate, pre-dle-backup, post-dle-backup
  property "DF-PATH"  "/usr/sbin/df"
  property "ZFS-PATH" "/usr/sbin/zfs"
}

define application-tool app_amgtar {
  comment "amgtar"
  plugin "amgtar"
  property "ATIME-PRESERVE" "no"
  property "GNUTAR-PATH" "/usr/bin/gtar"
}

define dumptype zfs-snapshot {
  program "APPLICATION"
  application "app_amgtar"
  script "script_zfs_snapshot"
  auth "bsdtcp"
}

## output of "amadmin daily ..."

sgw@sun:~$ amadmin daily disklist sun r_storage | grep script
sgw@sun:~$ amadmin daily disklist sun /home | grep script
        script "script_zfs_snapshot"

Only the one-liner triggers the usage of the script.

This is also traceable by "zfs list -t snapshot" while amdump is
running: there is no snapshot created etc.

The one-line syntax works as expected, creating the snapshot etc

--

I assume that this is not wanted behavior, at least it seems to hurt the
rule of "least surprise" ...

Stefan



Index: common-src/conffile.c
===================================================================
--- common-src/conffile.c       (revision 15137)
+++ common-src/conffile.c       (working copy)
@@ -5708,7 +5708,7 @@
            valdst->v.pp_scriptlist = NULL;
            if (valsrc->v.pp_scriptlist) {
                g_slist_foreach(valsrc->v.pp_scriptlist, &copy_pp_scriptlist,
-                               valdst->v.pp_scriptlist);
+                               &valdst->v.pp_scriptlist);
            }
            break;
 
@@ -5747,9 +5747,9 @@
     gpointer user_data_p)
 {
     pp_script_t *pp_script   = data_p;
-    pp_scriptlist_t pp_scriptlist = user_data_p;
+    pp_scriptlist_t *pp_scriptlist = user_data_p;
 
-    pp_scriptlist = g_slist_append(pp_scriptlist, pp_script);
+    *pp_scriptlist = g_slist_append(*pp_scriptlist, pp_script);
 }
 
 static void
<Prev in Thread] Current Thread [Next in Thread>