Amanda-Users

Re: amflush oddity

2006-12-27 09:43:49
Subject: Re: amflush oddity
From: Jean-Louis Martineau <martineau AT zmanda DOT com>
To: Frank Smith <fsmith AT hoovers DOT com>
Date: Wed, 27 Dec 2006 09:35:28 -0500
Frank Smith wrote:
Debian package 2.5.1p1-2.1

At home I leave the tape out of the drive most of the time and
only insert a tape and run amflush when the space used on the
holding disk approaches the capacity of my tape. This has been
working well until the latest upgrade (which overwrote the patched
version I had manually built to overcome the failures due to tar
1.16 return status of 1 for changed files causing dumps to fail).
It was fixed after 2.5.1p2 release, the fix will be in 2.5.1p3.

Anyway, now amflush reports
*** THE DUMPS DID NOT FINISH PROPERLY!
even though everything was successfully flushed to tape according
to the dump summary.  I'm guessing that error message was triggered
by the WARNING in the NOTES section:
driver: WARNING: This is not the first amdump run today. Enable the
usetimestamps option in the configuration file if you want to run
amdump more than once per calendar day.

I didn't run amdump more than once.  It ran early this morning
to do the backups, and then I ran amflush this afternoon.  Does
amflush count as an amdump run?
It should not, try the attached patch.

Jean-Louis

diff -u -r --show-c-function --new-file 
--exclude-from=/home/martinea/src.orig/amanda.diff 
--ignore-matching-lines='$Id:' amanda-2.5.1p2.new/server-src/driver.c 
amanda-2.5.1p2.new.amflush/server-src/driver.c
--- amanda-2.5.1p2.new/server-src/driver.c      2006-12-12 09:56:39.000000000 
-0500
+++ amanda-2.5.1p2.new.amflush/server-src/driver.c      2006-12-27 
09:20:10.000000000 -0500
@@ -242,16 +242,18 @@ main(
 
     /* check that we don't do many dump in a day and usetimestamps is off */
     if(strlen(driver_timestamp) == 8) {
-       char *conf_logdir = getconf_str(CNF_LOGDIR);
-       char *logfile    = vstralloc(conf_logdir, "/log.",
-                                    driver_timestamp, ".0", NULL);
-       char *oldlogfile = vstralloc(conf_logdir, "/oldlog/log.",
-                                    driver_timestamp, ".0", NULL);
-       if(access(logfile, F_OK) == 0 || access(oldlogfile, F_OK) == 0) {
-           log_add(L_WARNING, "WARNING: This is not the first amdump run 
today. Enable the usetimestamps option in the configuration file if you want to 
run amdump more than once per calendar day.");
+       if (!nodump) {
+           char *conf_logdir = getconf_str(CNF_LOGDIR);
+           char *logfile    = vstralloc(conf_logdir, "/log.",
+                                        driver_timestamp, ".0", NULL);
+           char *oldlogfile = vstralloc(conf_logdir, "/oldlog/log.",
+                                        driver_timestamp, ".0", NULL);
+           if(access(logfile, F_OK) == 0 || access(oldlogfile, F_OK) == 0) {
+               log_add(L_WARNING, "WARNING: This is not the first amdump run 
today. Enable the usetimestamps option in the configuration file if you want to 
run amdump more than once per calendar day.");
+           }
+           amfree(oldlogfile);
+           amfree(logfile);
        }
-       amfree(oldlogfile);
-       amfree(logfile);
        hd_driver_timestamp = construct_timestamp(NULL);
     }
     else {
<Prev in Thread] Current Thread [Next in Thread>
  • amflush oddity, Frank Smith
    • Re: amflush oddity, Jean-Louis Martineau <=