Nathan,
Thanks for reporting the bug, it is already fixed in trunk but we forget
to backported it to 3.3.
I'm attaching the patch, it also apply to 2.6.1p2
I have no solution for the GNUTAR program.
Jean-Louis
On 12/16/2011 12:46 AM, Nathan Stratton Treadway wrote:
I run multiple Amanda configurations to back up different DLEs on
various cycles, etc.
In most cases my DLEs are different in the different configurations, but
in a few cases I want to back up the same filesystem in more than one
configuration. (Normally I just have simple "host path dumptype" lines
in my disklist files.)
I've recently discovered that when I have the same host/path pair in
multiple configurations, the filenames generated for the GNU tar listed
incremental snapshot files end up clashing, so that the snapshot files
generated one configuration's run over-write the files generated by
another configuration's run.
(The files in question are the ones put in the "listed_incr_dir"
directory, e.g. /var/lib/amanda/gnutar-lists/ on my Debian/Ubuntu
machines.)
Some of my machines are running Ubuntu Lucid, with Amanda 2.6.1p1. I
thought I'd try setting up an application-tool instance of amgtar and
use the GNUTAR-LISTDIR property to point the files to a different
directory for each configuration -- but the property seems to be
ignored... (I'll put details about that at the end of this message.)
Has anyone else run into this cross-configuration snapshot-file-clashing
problem? If so, did you find a better solution than using a "diskname"
value on each disklist line to manually ensure that the entries were
unique across all configurations?
(I still have some servers running pre-application-tool versions of
Amanda, so I'd be interested to hear any clever solutions for the
standard "program GNUTAR" dumptype as well...)
Or am I the only one who ever tries to doing incremental backups of the
same filesystems from multiple configurations? (It seems like the
GNUTAR-LISTDIR property bug is still there in Amanda 3.3, and I'm a
little surprise no one else has noticed that it's not working....)
Thanks.
Nathan
p.s. Here are a couple lines out of the "ps aux" output I got during my
amdump run when I tried using the GNUTAR-LISTDIR property:
backup 15825 0.4 0.1 4324 1644 ? S 23:50 0:02 amgtar
backup --message line --config NightlyBackup --host mycroft --disk / --device /
--level 1 --index line --record --exclude-list /etc/amanda/exclude.gtar
--gnutar-listdir /var/lib/amanda/gnutar-lists/NightlyBackup --check-device NO
root 15827 1.9 0.6 7680 6468 ? S 23:50 0:10 /bin/tar
--create --verbose --file - --directory / --one-file-system
--atime-preserve=system --no-check-device --listed-incremental
/var/lib/amanda/gnutar-lists/mycroft__1.new --sparse --ignore-failed-read
--totals --exclude-from /tmp/amanda/amgtar._.20111213235008.exclude .
As you can see, the invocation of amgtar does include the
--gnutar-listdir option with my custom path, but the filename passed to
the --listed-incremental option in the tar command line uses the default
path instead of the one passed to amgtar. (On the other hand, the
"--check-device NO" option does get translated correctly into a
--no-check-device option on the tar call.)
I think I found the bug that causes this in amgtar.c, and I'll post a
note about that to the amanda-hackers list after I see if the discussion
here turns up anything I'm missing....
----------------------------------------------------------------------------
Nathan Stratton Treadway - [email protected] - Mid-Atlantic region
Ray Ontko& Co. - Software consulting services - http://www.ontko.com/
GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt ID: 1023D/ECFB6239
Key fingerprint = 6AD8 485E 20B9 5C71 231C 0C32 15F3 ADCD ECFB 6239
diff --git a/application-src/amgtar.c b/application-src/amgtar.c
index 32acd18..7cf28a1 100644
--- a/application-src/amgtar.c
+++ b/application-src/amgtar.c
@@ -296,6 +296,7 @@ main(
#else
gnutar_path = NULL;
#endif
+ gnutar_listdir = NULL;
gnutar_directory = NULL;
gnutar_onefilesystem = 1;
gnutar_atimepreserve = 1;
@@ -357,6 +358,7 @@ main(
/* parse argument */
command = argv[1];
+ gnutar_listdir = stralloc(getconf_str(CNF_GNUTAR_LIST_DIR));
argument.config = NULL;
argument.host = NULL;
argument.message = 0;
@@ -547,7 +549,6 @@ main(
}
}
- gnutar_listdir = getconf_str(CNF_GNUTAR_LIST_DIR);
if (strlen(gnutar_listdir) == 0)
gnutar_listdir = NULL;