Re: amanda 2.6.1 - configuration problem ?

2009-02-02 Thread Stefan G. Weichinger
Jean-Louis Martineau schrieb:
> Hi Stefan,
> 
> Try the attached patch.

errm, using binary osol-packages there as mentioned.
will have to prepare compile-environment to try that.
maybe faster for you to generate a new opensolaris-server-pkg?

;)

thanks, Stefan


Re: amanda 2.6.1 - configuration problem ?

2009-02-02 Thread Jean-Louis Martineau

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 ..."

s...@sun:~$ amadmin daily disklist sun r_storage | grep script
s...@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, ©_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


amanda 2.6.1 - configuration problem ?

2009-02-02 Thread Stefan G. Weichinger

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 ..."

s...@sun:~$ amadmin daily disklist sun r_storage | grep script
s...@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