Merge tag 'upstream/3.3.1'
authorBdale Garbee <bdale@gag.com>
Mon, 19 Mar 2012 14:42:06 +0000 (15:42 +0100)
committerBdale Garbee <bdale@gag.com>
Mon, 19 Mar 2012 14:42:06 +0000 (15:42 +0100)
Upstream version 3.3.1

Conflicts:
man/disklist.5

1  2 
client-src/selfcheck.c
debian/patches/dumpdates-path
man/amanda.conf.5
man/disklist.5
man/xml-source/amanda.conf.5.xml
server-src/diskfile.h

diff --combined client-src/selfcheck.c
index 5234f0f993cb4719d23bbf626602197ca88e43aa,e044a6cd50fbc6febd1aad01a2f253d2bab5ea48..04e824896688bf2586de692426d52b30e5a26a1a
@@@ -78,6 -78,7 +78,7 @@@ static void check_disk(dle_t *dle)
  static void check_overall(void);
  static int check_file_exist(char *filename);
  static void check_space(char *dir, off_t kbytes);
+ static void print_platform(void);
  
  int
  main(
      GSList *errlist;
      level_t *alevel;
  
+     if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) {
+       printf("selfcheck-%s\n", VERSION);
+       return (0);
+     }
      /* initialize */
  
      /*
      dbopen(DBG_SUBDIR_CLIENT);
      startclock();
      dbprintf(_("version %s\n"), VERSION);
+     g_printf("OK version %s\n", VERSION);
+     print_platform();
  
      if(argc > 2 && strcmp(argv[1], "amandad") == 0) {
        amandad_auth = stralloc(argv[2]);
@@@ -611,6 -619,7 +619,7 @@@ check_disk
  #endif
                                     "-c", "quit",
                                     NULL);
+               checkpid = checkpid;
                amfree(domain);
                aclose(nullfd);
                /*@ignore@*/
            access_type = "access";
  #endif
            if(access_result == -1) {
-               err = vstrallocf(_("Could not access %s (%s): %s"),
-                                qdevice, qdisk, strerror(errno));
+               err = vstrallocf(_("Could not %s %s (%s): %s"),
+                                access_type, qdevice, qdisk, strerror(errno));
            }
  #ifdef CHECK_FOR_ACCESS_WITH_OPEN
            aclose(access_result);
@@@ -1128,8 -1137,8 +1137,8 @@@ check_overall(void
        check_file(COMPRESS_PATH, X_OK);
  
      if (need_dump || need_xfsdump ) {
 -      if (check_file_exist("/etc/dumpdates")) {
 -          check_file("/etc/dumpdates",
 +      if (check_file_exist("/var/lib/dumpdates")) {
 +          check_file("/var/lib/dumpdates",
  #ifdef USE_RUNDUMP
                       F_OK
  #else
        } else {
  #ifndef USE_RUNDUMP
            if (access("/etc", R_OK|W_OK) == -1) {
 -              g_printf(_("ERROR [dump will not be able to create the /etc/dumpdates file: %s]\n"), strerror(errno));
 +              g_printf(_("ERROR [dump will not be able to create the /var/lib/dumpdates file: %s]\n"), strerror(errno));
            }
  #endif
        }
      }
  
      if (need_vdump) {
 -      if (check_file_exist("/etc/vdumpdates")) {
 -            check_file("/etc/vdumpdates", F_OK);
 +      if (check_file_exist("/var/lib/vdumpdates")) {
 +            check_file("/var/lib/vdumpdates", F_OK);
        }
      }
  
      check_space(AMANDA_DBGDIR, (off_t)64);    /* for amandad i/o */
  #endif
  
 +    check_space("/var/lib", (off_t)64);               /* for /var/lib/dumpdates writing */
      check_space("/etc", (off_t)64);           /* for /etc/dumpdates writing */
      }
  }
@@@ -1210,3 -1218,85 +1219,85 @@@ check_file_exist
      return 1;
  }
  
+ static void
+ print_platform(void)
+ {
+     struct stat stat_buf;
+     char *uname;
+     char *distro = NULL;
+     char *platform = NULL;
+     char  line[1025];
+     GPtrArray *argv_ptr;
+     if (stat("/etc/lsb-release", &stat_buf) == 0) {
+       FILE *release = fopen("/etc/lsb-release", "r");
+       distro = "Ubuntu";
+       if (release) {
+           char *result;
+           while ((result = fgets(line, 1024, release))) {
+               if (strstr(line, "DESCRIPTION")) {
+                   platform = strchr(line, '=');
+                   if (platform) platform++;
+               }
+           }
+           fclose(release);
+       }
+     } else if (stat("/etc/redhat-release", &stat_buf) == 0) {
+       FILE *release = fopen("/etc/redhat-release", "r");
+       distro = "RPM";
+       if (release) {
+           char *result;
+           result = fgets(line, 1024, release);
+           if (result) {
+               platform = line;
+           }
+           fclose(release);
+       }
+     } else if (stat("/etc/debian_version", &stat_buf) == 0) {
+       FILE *release = fopen("/etc/debian_version", "r");
+       distro = "Debian";
+       if (release) {
+           char *result;
+           result = fgets(line, 1024, release);
+           if (result) {
+               platform = line;
+           }
+           fclose(release);
+       }
+     } else {
+       argv_ptr = g_ptr_array_new();
+       g_ptr_array_add(argv_ptr, UNAME_PATH);
+       g_ptr_array_add(argv_ptr, "-s");
+       g_ptr_array_add(argv_ptr, NULL);
+       uname = get_first_line(argv_ptr);
+       if (uname) {
+           if (strncmp(uname, "SunOS", 5) == 0) {
+               FILE *release = fopen("/etc/release", "r");
+               distro = "Solaris";
+               if (release) {
+                   char *result;
+                   result = fgets(line, 1024, release);
+                   if (result) {
+                       platform = line;
+                   }
+               }
+               fclose(release);
+           }
+           amfree(uname);
+       }
+       g_ptr_array_free(argv_ptr, TRUE);
+     }
+     if (!distro) {
+       distro = "Unknown";
+     }
+     if (!platform) {
+       platform = "Unknown";
+     }
+     if (platform[strlen(platform) -1] == '\n') {
+       platform[strlen(platform) -1] = '\0';
+     }
+     g_fprintf(stdout, "OK distro %s\n", distro);
+     g_fprintf(stdout, "OK platform %s\n", platform);
+ }
index f86c8698c7cbdaf56a1177deb98a5964b5813602,0000000000000000000000000000000000000000..acf7e111d203f804baafc76b2f860138228e543f
mode 100644,000000..100644
--- /dev/null
@@@ -1,191 -1,0 +1,191 @@@
- -/etc/dumpdates, the disk\'s relative priority, etc\&.
- +/var/lib/dumpdates, the disk\'s relative priority, etc\&.
 +Description: make dumpdates path in docs match Debian configuration
 +Author: Bdale Garbee <bdale@gag.com>
 +
 +--- amanda-3.3.0.orig/man/disklist.5
 ++++ amanda-3.3.0/man/disklist.5
 +@@ -89,7 +89,7 @@ defined in the
 + \fBamanda\&.conf\fR
 + file\&.
 + \fIDumptype\fRs specify backup related parameters, such as whether to compress the backups, whether to record backup results in
++-/etc/dumpdates, the disk\*(Aqs relative priority, etc\&.
+++/var/lib/dumpdates, the disk\*(Aqs relative priority, etc\&.
 + .RE
 + .PP
 + \fIspindle\fR
 +--- amanda-3.3.0.orig/man/amanda.conf.5
 ++++ amanda-3.3.0/man/amanda.conf.5
 +@@ -1672,8 +1672,8 @@ keyword append the values to the list of
 + \fBrecord\fR \fIboolean\fR
 + .RS 4
 + Default:
 +-\fByes\fR\&. Whether to ask the backup program to update its database (e\&.g\&.
 +-/etc/dumpdates
 ++\fIyes\fR\&. Whether to ask the backup program to update its database (e\&.g\&.
 ++/var/lib/dumpdates
 + for DUMP or
 + /usr/local/var/amanda/gnutar\-lists
 + for GNUTAR) of time stamps\&. This is normally enabled for daily backups and turned off for periodic archival runs\&.
 +--- amanda-3.3.0.orig/man/entities/global.entities.in
 ++++ amanda-3.3.0/man/entities/global.entities.in
 +@@ -98,7 +98,7 @@
 + <!ENTITY tapelist '<manref name="tapelist" vol="5"/>'>
 + 
 + <!-- IDs for files used by AMANDA-->
 +-<!ENTITY dumpdates '<filename>/etc/dumpdates</filename>'>
 ++<!ENTITY dumpdates '<filename>/var/lib/dumpdates</filename>'>
 + 
 + <!-- IDs for AMANDA commands-->
 + <!ENTITY amadmin ' <command>amadmin</command>'>
 +--- amanda-3.3.0.orig/man/xml-source/disklist.5.xml
 ++++ amanda-3.3.0/man/xml-source/disklist.5.xml
 +@@ -112,7 +112,7 @@ file.
 + specify backup related parameters,
 + such as whether to compress the backups,
 + whether to record backup results in
 +-<filename>/etc/dumpdates</filename>, the disk's relative priority, etc.</para>
 ++<filename>/var/lib/dumpdates</filename>, the disk's relative priority, etc.</para>
 +   </listitem>
 +   </varlistentry>
 +   <varlistentry>
 +--- amanda-3.3.0.orig/man/xml-source/amanda.conf.5.xml
 ++++ amanda-3.3.0/man/xml-source/amanda.conf.5.xml
 +@@ -2155,8 +2155,8 @@ the property to set, and the others cont
 +   <term><amkeyword>record</amkeyword> <amtype>boolean</amtype></term>
 +   <listitem>
 + <para>Default:
 +-<amkeyword>yes</amkeyword>.
 +-Whether to ask the backup program to update its database (e.g. <filename>/etc/dumpdates</filename>
 ++<emphasis remap='I'>yes</emphasis>.
 ++Whether to ask the backup program to update its database (e.g. <filename>/var/lib/dumpdates</filename>
 + for DUMP or <filename>/usr/local/var/amanda/gnutar-lists</filename> for GNUTAR) of time stamps.
 + This is normally enabled for daily backups and turned off for periodic archival runs.</para>
 +   </listitem>
 +--- amanda-3.3.0.orig/client-src/amandates.c
 ++++ amanda-3.3.0/client-src/amandates.c
 +@@ -26,7 +26,7 @@
 + /*
 +  * $Id: amandates.c,v 1.21 2006/07/25 18:35:21 martinea Exp $
 +  *
 +- * manage amandates file, that mimics /etc/dumpdates, but stores
 ++ * manage amandates file, that mimics /var/lib/dumpdates, but stores
 +  * GNUTAR dates
 +  */
 + 
 +@@ -314,7 +314,7 @@ import_dumpdates(
 + 
 +     devname = amname_to_devname(amdp->name);
 + 
 +-    if((dumpdf = fopen("/etc/dumpdates", "r")) == NULL) {
 ++    if((dumpdf = fopen("/var/lib/dumpdates", "r")) == NULL) {
 +      amfree(devname);
 +      return;
 +     }
 +--- amanda-3.3.0.orig/client-src/selfcheck.c
 ++++ amanda-3.3.0/client-src/selfcheck.c
 +@@ -1128,8 +1128,8 @@ check_overall(void)
 +      check_file(COMPRESS_PATH, X_OK);
 + 
 +     if (need_dump || need_xfsdump ) {
 +-     if (check_file_exist("/etc/dumpdates")) {
 +-         check_file("/etc/dumpdates",
 ++     if (check_file_exist("/var/lib/dumpdates")) {
 ++         check_file("/var/lib/dumpdates",
 + #ifdef USE_RUNDUMP
 +                     F_OK
 + #else
 +@@ -1139,15 +1139,15 @@ check_overall(void)
 +      } else {
 + #ifndef USE_RUNDUMP
 +          if (access("/etc", R_OK|W_OK) == -1) {
 +-             g_printf(_("ERROR [dump will not be able to create the /etc/dumpdates file: %s]\n"), strerror(errno));
 ++             g_printf(_("ERROR [dump will not be able to create the /var/lib/dumpdates file: %s]\n"), strerror(errno));
 +          }
 + #endif
 +      }
 +     }
 + 
 +     if (need_vdump) {
 +-     if (check_file_exist("/etc/vdumpdates")) {
 +-            check_file("/etc/vdumpdates", F_OK);
 ++     if (check_file_exist("/var/lib/vdumpdates")) {
 ++            check_file("/var/lib/vdumpdates", F_OK);
 +      }
 +     }
 + 
 +@@ -1159,6 +1159,7 @@ check_overall(void)
 +     check_space(AMANDA_DBGDIR, (off_t)64);   /* for amandad i/o */
 + #endif
 + 
 ++    check_space("/var/lib", (off_t)64);              /* for /var/lib/dumpdates writing */
 +     check_space("/etc", (off_t)64);          /* for /etc/dumpdates writing */
 +     }
 + }
 +--- amanda-3.3.0.orig/server-src/diskfile.h
 ++++ amanda-3.3.0/server-src/diskfile.h
 +@@ -110,7 +110,7 @@ typedef struct disk_s {
 +     char     *clnt_decrypt_opt;      /* client-side decryption option parameter to use */
 +     double   comprate[2];            /* default compression rates */
 +     /* flag options */
 +-    int              record;                 /* record dump in /etc/dumpdates ? */
 ++    int              record;                 /* record dump in /var/lib/dumpdates ? */
 +     int              skip_incr;              /* incs done externally ? */
 +     int              skip_full;              /* fulls done externally ? */
 +     int              to_holdingdisk;         /* use holding disk ? */
 +--- amanda-3.3.0.orig/example/amanda.conf.in
 ++++ amanda-3.3.0/example/amanda.conf.in
 +@@ -460,7 +460,7 @@ define tapetype SEAGATE-ULTRIUM-LTO {
 + #   program  - specify the dump system to use.  Valid values are "DUMP",
 + #                 or "GNUTAR".  Default: [program "DUMP"].
 + #   record   - record the backup in the time-stamp-database of the backup
 +-#              program (e.g. /etc/dumpdates for DUMP or
 ++#              program (e.g. /var/lib/dumpdates for DUMP or
 + #              @GNUTAR_LISTED_INCREMENTAL_DIRX@ for GNUTAR.).
 + #              Default: [record yes]
 + #   skip-full        - skip the disk when a level 0 is due, to allow full backups
 +@@ -621,7 +621,7 @@ define dumptype nocomp-high {
 + 
 + define dumptype nocomp-test {
 +     global
 +-    comment "test dump without compression, no /etc/dumpdates recording"
 ++    comment "test dump without compression, no /var/lib/dumpdates recording"
 +     compress none
 +     record no
 +     priority medium
 +@@ -629,7 +629,7 @@ define dumptype nocomp-test {
 + 
 + define dumptype comp-test {
 +     nocomp-test
 +-    comment "test dump with compression, no /etc/dumpdates recording"
 ++    comment "test dump with compression, no /var/lib/dumpdates recording"
 +     compress client fast
 + }
 + 
 +--- amanda-3.3.0.orig/example/template.d/dumptypes
 ++++ amanda-3.3.0/example/template.d/dumptypes
 +@@ -106,7 +106,7 @@
 + #   program  - specify the dump system to use.  Valid values are "DUMP" 
 + #              "STAR" and "GNUTAR".  Default: [program "DUMP"].
 + #   record   - record the backup in the time-stamp-database of the backup
 +-#              program (e.g. /etc/dumpdates for DUMP or
 ++#              program (e.g. /var/lib/dumpdates for DUMP or
 + #              /var/lib/amanda/gnutar-lists for GNUTAR.).
 + #              Default: [record yes]
 + #   skip-full        - skip the disk when a level 0 is due, to allow full backups
 +@@ -302,7 +302,7 @@ define dumptype nocomp-high {
 + 
 + define dumptype nocomp-test {
 +     global
 +-    comment "test dump without compression, no /etc/dumpdates recording"
 ++    comment "test dump without compression, no /var/lib/dumpdates recording"
 +     compress none
 +     record no
 +     priority medium
 +@@ -310,7 +310,7 @@ define dumptype nocomp-test {
 + 
 + define dumptype comp-test {
 +     nocomp-test
 +-    comment "test dump with compression, no /etc/dumpdates recording"
 ++    comment "test dump with compression, no /var/lib/dumpdates recording"
 +     compress client fast
 + }
 + 
diff --combined man/amanda.conf.5
index da28e8e2425a0fe1bd7de4119d4deb0d2a316ebb,0fba0e25cf37c68fb7661bb9d973366f0b972736..a412d96eadf4f42fe54e9f304538fc86d0acba68
@@@ -1,13 -1,22 +1,22 @@@
  '\" t
  .\"     Title: amanda.conf
  .\"    Author: James da Silva <jds@amanda.org>
- .\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
- .\"      Date: 06/02/2011
+ .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+ .\"      Date: 02/21/2012
  .\"    Manual: File formats and conventions
- .\"    Source: Amanda 3.3.0
+ .\"    Source: Amanda 3.3.1
  .\"  Language: English
  .\"
- .TH "AMANDA\&.CONF" "5" "06/02/2011" "Amanda 3\&.3\&.0" "File formats and conventions"
+ .TH "AMANDA\&.CONF" "5" "02/21/2012" "Amanda 3\&.3\&.1" "File formats and conventions"
+ .\" -----------------------------------------------------------------
+ .\" * Define some portability stuff
+ .\" -----------------------------------------------------------------
+ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ .\" http://bugs.debian.org/507673
+ .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ .ie \n(.g .ds Aq \(aq
+ .el       .ds Aq '
  .\" -----------------------------------------------------------------
  .\" * set default formatting
  .\" -----------------------------------------------------------------
@@@ -42,13 -51,13 +51,13 @@@ Keywords are case insensitive, i\&.e\&
  \fBmailto\fR
  and
  \fBMailTo\fR
- are treated the same\&. Also, the characters \'\fB\-\fR\' and \'\fB_\fR\' are interchangeable in all predefined Amanda keywords:
+ are treated the same\&. Also, the characters \*(Aq\fB\-\fR\*(Aq and \*(Aq\fB_\fR\*(Aq are interchangeable in all predefined Amanda keywords:
  \fBdevice_property\fR
  and
  \fBdevice\-property\fR
  have the same meaning\&. This manpage uses the dashed versions, but the underscored versions will be accepted for backward compatibility
  .PP
- Identifiers are names which are defined in the configuration itself, such as dumptypes or interfaces\&. Identifiers are are case\-insensitive, but sensitive to \'\fB\-\fR\' vs\&. \'\fB_\fR\'\&. Identifiers should be quoted in the configuration file, although For historical reasons, the quotes are optional\&.
+ Identifiers are names which are defined in the configuration itself, such as dumptypes or interfaces\&. Identifiers are are case\-insensitive, but sensitive to \*(Aq\fB\-\fR\*(Aq vs\&. \*(Aq\fB_\fR\*(Aq\&. Identifiers should be quoted in the configuration file, although For historical reasons, the quotes are optional\&.
  .PP
  Strings are always quoted with double quotes ("), and any double quotes or backslashes within the string are escaped with a backslash:
  .sp
@@@ -191,7 -200,7 +200,7 @@@ Illegally quoted strings are handled o
  Examples:
  .sp
  .nf
- finserver "/data/finance/XYZ Corp\'s \e"real\e" finances" finance\-high eth0 \-1
+ finserver "/data/finance/XYZ Corp\*(Aqs \e"real\e" finances" finance\-high eth0 \-1
  property "syspath" "C:\e\eWINDOWS\e\eSYSTEM"
  .fi
  .SS "SUBSECTIONS AND INHERITANCE"
@@@ -208,7 -217,7 +217,7 @@@ define dumptype global 
  }
  
  define dumptype nocomp {
-     global      # inherit the parameters in dumptype \'global\'
+     global      # inherit the parameters in dumptype \*(Aqglobal\*(Aq
      compress none
  }
  .fi
@@@ -233,7 -242,7 +242,7 @@@ define tapetype child 
      filemark 32k
  }
  .fi
- In this example, \'child\' will have a filemark of 32k, a speed of 400bps, and a length of 200M\&.
+ In this example, \*(Aqchild\*(Aq will have a filemark of 32k, a speed of 400bps, and a length of 200M\&.
  .SH "GLOBAL PARAMETERS"
  .PP
  \fBorg\fR \fIstring\fR
@@@ -244,7 -253,7 +253,7 @@@ Default
  .PP
  \fBmailer\fR \fIstring\fR
  .RS 4
- Default found by configure\&. A mail program that can send mail with \'\fIMAILER \-s "subject" user < message_file\fR\'\&.
+ Default found by configure\&. A mail program that can send mail with \*(Aq\fIMAILER \-s "subject" user < message_file\fR\*(Aq\&.
  .RE
  .PP
  \fBmailto\fR \fIstring\fR
@@@ -278,6 -287,12 +287,12 @@@ Never send an email\&
  .RE
  .RE
  .PP
+ \fBmax\-dle\-by\-volume\fR \fIint\fR
+ .RS 4
+ Default:
+ \fI1000000000\fR\&. The maximum number of dle written to a single volume\&.
+ .RE
+ .PP
  \fBdumpcycle\fR \fIint\fR
  .RS 4
  Default:
@@@ -322,8 -337,8 +337,8 @@@ days 
  \fBtapecycle\fR \fIint\fR
  .RS 4
  Default:
- \fI15 tapes\fR\&. Specifies the number of "active" volumes \- volumes that Amanda will not overwrite\&. While Amanda is always willing to write to a new volume, it refuses to overwrite a volume unless at least \'\fBtapecycle\fR
- \-1\' volumes have been written since\&.
+ \fI15 tapes\fR\&. Specifies the number of "active" volumes \- volumes that Amanda will not overwrite\&. While Amanda is always willing to write to a new volume, it refuses to overwrite a volume unless at least \*(Aq\fBtapecycle\fR
+ \-1\*(Aq volumes have been written since\&.
  .sp
  It is considered good administrative practice to set the
  \fBtapecycle\fR
@@@ -352,7 -367,7 +367,7 @@@ is set to two or four times the tapes p
  \fBusetimestamps\fR \fIbool\fR
  .RS 4
  Default:
- \fBYes\fR\&. This option allows Amanda to track multiple runs per calendar day\&. The only reason one might disable it is that Amanda versions before 2\&.5\&.1 can\'t read logfiles written when this option was enabled\&.
+ \fBYes\fR\&. This option allows Amanda to track multiple runs per calendar day\&. The only reason one might disable it is that Amanda versions before 2\&.5\&.1 can\*(Aqt read logfiles written when this option was enabled\&.
  .RE
  .PP
  \fBlabel\-new\-tapes\fR \fIstring\fR
@@@ -376,22 -391,30 +391,30 @@@ When using this directive, specify the 
      $c : config name
      $o : org configuration
      $b : barcode of the volume
+     $s : slot number, can specify a minimun number of digit:
+          $3s to get \*(Aq001\*(Aq
      $m : meta label
  .fi
  .sp
- The template should contain some number of contiguous \'%\' characters, which will be replaced with a generated number\&. Be sure to specify enough \'%\' characters that you do not run out of tape labels\&. Example:
+ The template can contain some number of contiguous \*(Aq%\*(Aq characters, which will be replaced with a generated number\&. Be sure to specify enough \*(Aq%\*(Aq characters that you do not run out of tape labels\&. Example:
  \fB"DailySet1\-%%%"\fR,
  \fB"$c\-%%%"\fR,
  \fB"$m\-%%%"\fR,
  \fB"$m\-$b"\fR
  .sp
+ The generared label can be used only if it match the
+ \fBlabelstr\fR
+ setting\&. The volume will not be used if the generated label doesn\*(Aqt match the
+ \fBlabelstr\fR
+ setting\&.
+ .sp
  Note that many devices cannot distinguish an empty tape from an error condition, so it may is often necessary to include
  \fBvolume\-error\fR
  as an autolabel condition\&.
  .PP
  \fBany\fR
  .RS 4
- equivalent to \'\fBother\-config non\-amanda volume\-error empty\fR\'
+ equivalent to \*(Aq\fBother\-config non\-amanda volume\-error empty\fR\*(Aq
  .RE
  .PP
  \fBother\-config\fR
@@@ -433,7 -456,7 +456,7 @@@ When using this directive, specify the 
      $o : org configuration
  .fi
  .sp
- The template should contain some number of contiguous \'%\' characters, which will be replaced with a generated number\&. Be sure to specify enough \'%\' characters that you do not run out of meta labels\&. Example:
+ The template should contain some number of contiguous \*(Aq%\*(Aq characters, which will be replaced with a generated number\&. Be sure to specify enough \*(Aq%\*(Aq characters that you do not run out of meta labels\&. Example:
  \fB"DailySet1\-%%%"\fR,
  \fB"$o\-%%%"\fR,
  .RE
@@@ -579,16 -602,23 +602,23 @@@ Last in, first out\&
  .PP
  \fBtaper\-parallel\-write\fR \fIint\fR
  .RS 4
- .PP
  Default:
  \fI1\fR\&. Amanda can write simultaneously up to that number of volume at any given time\&. The changer must have as many drives\&.
  .RE
  .PP
+ \fBeject\-volume\fR \fIint\fR
+ .RS 4
+ Default:
+ \fIno\fR\&. Set to
+ \fByes\fR
+ if you want the volume to be ejected after Amanda wrote data to it\&. It works only with some changer and device\&.
+ .RE
+ .PP
  \fBlabelstr\fR \fIstring\fR
  .RS 4
  Default:
  \fI"\&.*"\fR\&. The tape label constraint regular expression\&. All tape labels generated (see
- \fBamlabel\fR(8)) and used by this configuration must match the regular expression\&. If multiple configurations are run from the same tape server host, it is helpful to set their labels to different strings (for example, "DAILY[0\-9][0\-9]*" vs\&. "ARCHIVE[0\-9][0\-9]*") to avoid overwriting each other\'s tapes\&.
+ \fBamlabel\fR(8)) and used by this configuration must match the regular expression\&. If multiple configurations are run from the same tape server host, it is helpful to set their labels to different strings (for example, "DAILY[0\-9][0\-9]*" vs\&. "ARCHIVE[0\-9][0\-9]*") to avoid overwriting each other\*(Aqs tapes\&.
  .RE
  .PP
  \fBtapetype\fR \fIstring\fR
@@@ -631,7 -661,7 +661,7 @@@ Default
  \fBplanner\fR
  step of
  \fBamdump\fR
- will wait to get the dump size estimates (note: Amanda runs up to 3 estimates for each DLE)\&. For instance, with the default of 300 seconds and four DLE\'s, each estimating level 0 and level 1 on client A,
+ will wait to get the dump size estimates (note: Amanda runs up to 3 estimates for each DLE)\&. For instance, with the default of 300 seconds and four DLE\*(Aqs, each estimating level 0 and level 1 on client A,
  \fBplanner\fR
  will wait up to 40 minutes for that machine\&. A negative value will be interpreted as a total amount of time to wait per client instead of per disk\&.
  .RE
@@@ -645,13 -675,13 +675,13 @@@ Default
  \fBreq\-tries\fR \fIint\fR
  .RS 4
  Default:
- \fI3\fR\&. How many times the server will resend a REQ packet if it doesn\'t get the ACK packet\&.
+ \fI3\fR\&. How many times the server will resend a REQ packet if it doesn\*(Aqt get the ACK packet\&.
  .RE
  .PP
  \fBnetusage\fR \fIint\fR
  .RS 4
  Default:
- \fI8000 Kbps\fR\&. The maximum network bandwidth allocated to Amanda, in Kbytes per second\&. See also the
+ \fI80000 Kbps\fR\&. The maximum network bandwidth allocated to Amanda, in Kbytes per second\&. See also the
  \fBinterface\fR
  section\&.
  .RE
  \fBinparallel\fR \fIint\fR
  .RS 4
  Default:
- \fI10\fR\&. The maximum number of backups that Amanda will attempt to run in parallel\&. Amanda will stay within the constraints of network bandwidth and holding disk space available, so it doesn\'t hurt to set this number a bit high\&. Some contention can occur with larger numbers of backups, but this effect is relatively small on most systems\&.
+ \fI10\fR\&. The maximum number of backups that Amanda will attempt to run in parallel\&. Amanda will stay within the constraints of network bandwidth and holding disk space available, so it doesn\*(Aqt hurt to set this number a bit high\&. Some contention can occur with larger numbers of backups, but this effect is relatively small on most systems\&.
  .RE
  .PP
  \fBdisplayunit\fR "k|m|g|t"
@@@ -850,7 -880,7 +880,7 @@@ Default
  .PP
  \fBamrecover\-changer\fR \fIstring\fR
  .RS 4
- Default: not set\&. Amrecover will use the changer if you use \'settape <string>\' and that string is the same as the
+ Default: not set\&. Amrecover will use the changer if you use \*(Aqsettape <string>\*(Aq and that string is the same as the
  \fBamrecover\-changer\fR
  setting\&.
  .RE
@@@ -863,7 -893,7 +893,7 @@@ Defines the width of column
  \fBamreport\fR
  should use\&.
  \fIString\fR
- is a comma (\',\') separated list of triples\&. Each triple consists of three parts which are separated by a equal sign (\'=\') and a colon (\':\') (see the example)\&. These four parts specify:
+ is a comma (\*(Aq,\*(Aq) separated list of triples\&. Each triple consists of three parts which are separated by a equal sign (\*(Aq=\*(Aq) and a colon (\*(Aq:\*(Aq) (see the example)\&. These four parts specify:
  .sp
  .RS 4
  .ie n \{\
@@@ -1056,7 -1086,7 +1086,7 @@@ The value of this parameter may not exc
  \fBflush\-threshold\-scheduled\fR
  parameter\&.;
  \fBautoflush\fR
- must be set to \'yes\' if
+ must be set to \*(Aqyes\*(Aq if
  \fBtaperflush\fR
  is greater than 0\&.
  .RE
@@@ -1436,7 -1466,7 +1466,7 @@@ Use a faster program to do estimates, b
  .PP
  server
  .RS 4
- Use only statistics from the previous few runs to give an estimate\&. This very quick, but the result is not accurate if your disk usage changes from day to day\&. If this method is specified, but the server does not have enough data to make an estimate, then the option is internally moved to the end of the list, thereby preferring \'client\' or \'calcsize\' in this case\&.
+ Use only statistics from the previous few runs to give an estimate\&. This very quick, but the result is not accurate if your disk usage changes from day to day\&. If this method is specified, but the server does not have enough data to make an estimate, then the option is internally moved to the end of the list, thereby preferring \*(Aqclient\*(Aq or \*(Aqcalcsize\*(Aq in this case\&.
  .RE
  .RE
  .PP
@@@ -1464,7 -1494,7 +1494,7 @@@ is an exclude expression\&. Wit
  \fIstring\fR
  is a file name on the client containing
  \fBGNU\-tar\fR
- exclude expressions\&. The path to the specified exclude list file, if present (see description of \'optional\' below), must be readable by the Amanda user\&.
+ exclude expressions\&. The path to the specified exclude list file, if present (see description of \*(Aqoptional\*(Aq below), must be readable by the Amanda user\&.
  .sp
  All exclude expressions are concatenated in one file and passed to the application as an
  \fB\-\-exclude\-from\fR
  \fBoptional\fR
  is specified for
  \fBexclude\fR
- \fBlist\fR, then amcheck will not complain if the file doesn\'t exist or is not readable\&.
+ \fBlist\fR, then amcheck will not complain if the file doesn\*(Aqt exist or is not readable\&.
  .sp
  For
  \fBexclude\fR
@@@ -1518,12 -1548,12 +1548,12 @@@ Never use a holdingdisk, the dump will 
  .PP
  \fBauto\fR|yes|true|on
  .RS 4
- Use the holding disk, unless there is a problem with the holding disk, the dump won\'t fit there or the medium doesn\'t require spooling (e\&.g\&., VFS device)
+ Use the holding disk, unless there is a problem with the holding disk, the dump won\*(Aqt fit there or the medium doesn\*(Aqt require spooling (e\&.g\&., VFS device)
  .RE
  .PP
  \fBrequired\fR
  .RS 4
- Always dump to holdingdisk, never directly to tape\&. There will be no dump if it doesn\'t fit on holdingdisk
+ Always dump to holdingdisk, never directly to tape\&. There will be no dump if it doesn\*(Aqt fit on holdingdisk
  .RE
  .RE
  .PP
@@@ -1586,7 -1616,7 +1616,7 @@@ overwrites the list\&
  If
  \fBoptional\fR
  is specified for
- \fBinclude list\fR, then amcheck will not complain if the file doesn\'t exist or is not readable\&.
+ \fBinclude list\fR, then amcheck will not complain if the file doesn\*(Aqt exist or is not readable\&.
  .sp
  For
  \fBinclude list\fR, If the file name is relative, the disk name being backed up is prepended\&.
@@@ -1617,7 -1647,7 +1647,7 @@@ Default
  \fBmaxpromoteday\fR \fIint\fR
  .RS 4
  Default:
- \fI10000\fR\&. The maximum number of day for a promotion, set it 0 if you don\'t want promotion, set it to 1 or 2 if your disks get overpromoted\&.
+ \fI10000\fR\&. The maximum number of day for a promotion, set it 0 if you don\*(Aqt want promotion, set it to 1 or 2 if your disks get overpromoted\&.
  .RE
  .PP
  \fBpriority\fR [ \fBlow\fR | \fBmedium\fR | \fBhigh\fR ]
@@@ -1672,8 -1702,8 +1702,8 @@@ keyword append the values to the list o
  \fBrecord\fR \fIboolean\fR
  .RS 4
  Default:
 -\fByes\fR\&. Whether to ask the backup program to update its database (e\&.g\&.
 -/etc/dumpdates
 +\fIyes\fR\&. Whether to ask the backup program to update its database (e\&.g\&.
 +/var/lib/dumpdates
  for DUMP or
  /usr/local/var/amanda/gnutar\-lists
  for GNUTAR) of time stamps\&. This is normally enabled for daily backups and turned off for periodic archival runs\&.
@@@ -1732,7 -1762,7 +1762,7 @@@ Never do incremental backups, only ful
  .PP
  \fBskip\fR
  .RS 4
- Treat this DLE as if it doesn\'t exist (useful to disable DLEs when sharing the
+ Treat this DLE as if it doesn\*(Aqt exist (useful to disable DLEs when sharing the
  \fIdisklist\fR
  file between multiple configurations)\&. Skipped DLEs will not be checked or dumped, and will not be matched by disklist expressions\&.
  .RE
@@@ -1919,7 -1949,7 +1949,7 @@@ device property, but if the blocksize i
  .RS 4
  Default:
  \fI32 kytes\fR
- How much data will be read in each tape record\&. This can be used to override a device\'s block size for reads only\&. This may be useful, for example, in reading a tape written with a 256k block size when Amanda is configured to use 128k blocks\&. This unusual feature is not supported by all operating systems and tape devices\&.
+ How much data will be read in each tape record\&. This can be used to override a device\*(Aqs block size for reads only\&. This may be useful, for example, in reading a tape written with a 256k block size when Amanda is configured to use 128k blocks\&. This unusual feature is not supported by all operating systems and tape devices\&.
  .sp
  The default unit is Kbytes if it is not specified\&.
  .RE
@@@ -2017,7 -2047,7 +2047,7 @@@ Default: not set\&. A comment string de
  \fBuse\fR \fIint\fR
  .RS 4
  Default:
- \fI8000 Kbps\fR\&. The speed of the interface in Kbytes per second\&.
+ \fI80000 Kbps\fR\&. The speed of the interface in Kbytes per second\&.
  .RE
  .PP
  In addition to options, another
@@@ -2056,7 -2086,7 +2086,7 @@@ is set then it is an error if that appl
  .sp
  If
  \fBclient\-name\fR
- is not set then the merge is done with the application that have the name equal to the plugin\&. eg\&. if the plugin is \'amgtar\', then the setting from the application \'amgtar\' is used if it is defined\&.
+ is not set then the merge is done with the application that have the name equal to the plugin\&. eg\&. if the plugin is \*(Aqamgtar\*(Aq, then the setting from the application \*(Aqamgtar\*(Aq is used if it is defined\&.
  .RE
  .PP
  \fBcomment\fR \fIstring\fR
@@@ -2109,7 -2139,7 +2139,7 @@@ is set then it is an error if that scri
  .sp
  If
  \fBclient\-name\fR
- is not set then the merge is done with the script that have the name equal to the plugin\&. eg\&. if the plugin is \'amlog\-script\', then the setting from the script \'amlog\-script\' is used\&.
+ is not set then the merge is done with the script that have the name equal to the plugin\&. eg\&. if the plugin is \*(Aqamlog\-script\*(Aq, then the setting from the script \*(Aqamlog\-script\*(Aq is used\&.
  .RE
  .PP
  \fBcomment\fR \fIstring\fR
@@@ -2219,7 -2249,7 +2249,7 @@@ Execute before the backup command for t
  .PP
  \fBpre\-host\-backup\fR
  .RS 4
- Execute before the backup command for all dle for the client\&. It can\'t be run on client, it must be run on server
+ Execute before the backup command for all dle for the client\&. It can\*(Aqt be run on client, it must be run on server
  .RE
  .PP
  \fBpost\-backup\fR
@@@ -2234,7 -2264,7 +2264,7 @@@ Execute after the backup command for th
  .PP
  \fBpost\-host\-backup\fR
  .RS 4
- Execute after the backup command for all dle for the client\&. It can\'t be run on client, it must be run on server
+ Execute after the backup command for all dle for the client\&. It can\*(Aqt be run on client, it must be run on server
  .RE
  .PP
  \fBpre\-recover\fR
@@@ -2308,7 -2338,7 +2338,7 @@@ parameter\&. Th
  specifies the device name to use; see
  \fBamanda-devices\fR(7)\&. As with most sections, the
  \fIcomment\fR
- parmeter is optional and only for the user\'s convenience\&.
+ parmeter is optional and only for the user\*(Aqs convenience\&.
  .PP
  An arbitrary number of
  \fIdevice\-property\fR
diff --combined man/disklist.5
index bea8abb8e293138bfa9150ed7b19077454afd76a,84bd2d4fc3afab0d01142f9e445eef1731763e67..915248b571aa86444ba0dda491174017c0990a46
@@@ -1,13 -1,22 +1,22 @@@
  '\" t
  .\"     Title: disklist
  .\"    Author: James da Silva <jds@amanda.org>
- .\" Generator: DocBook XSL Stylesheets vsnapshot_8273 <http://docbook.sf.net/>
- .\"      Date: 06/02/2011
+ .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
+ .\"      Date: 02/21/2012
  .\"    Manual: File formats and conventions
- .\"    Source: Amanda 3.3.0
+ .\"    Source: Amanda 3.3.1
  .\"  Language: English
  .\"
- .TH "DISKLIST" "5" "06/02/2011" "Amanda 3\&.3\&.0" "File formats and conventions"
+ .TH "DISKLIST" "5" "02/21/2012" "Amanda 3\&.3\&.1" "File formats and conventions"
+ .\" -----------------------------------------------------------------
+ .\" * Define some portability stuff
+ .\" -----------------------------------------------------------------
+ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ .\" http://bugs.debian.org/507673
+ .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+ .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ .ie \n(.g .ds Aq \(aq
+ .el       .ds Aq '
  .\" -----------------------------------------------------------------
  .\" * set default formatting
  .\" -----------------------------------------------------------------
@@@ -50,12 -59,12 +59,12 @@@ The name of the disk (a label)\&. In mo
  \fBdiskname\fR
  to the
  \fBdiskdevice\fR
- and you don\'t set the
+ and you don\*(Aqt set the
  \fBdiskdevice\&.\fR
  If you want multiple entries with the same
  \fBdiskdevice\fR, you must set a different
  \fBdiskname\fR
- for each entry\&. It\'s the
+ for each entry\&. It\*(Aqs the
  \fBdiskname\fR
  that you use on the commandline for any Amanda command\&. Look at the example/disklist file for example\&.
  .RE
@@@ -89,7 -98,7 +98,7 @@@ defined in th
  \fBamanda\&.conf\fR
  file\&.
  \fIDumptype\fRs specify backup related parameters, such as whether to compress the backups, whether to record backup results in
- /var/lib/dumpdates, the disk\'s relative priority, etc\&.
 -/etc/dumpdates, the disk\*(Aqs relative priority, etc\&.
++/var/lib/dumpdates, the disk\*(Aqs relative priority, etc\&.
  .RE
  .PP
  \fIspindle\fR
index 518264d9103a819881b0f56f9043996e6df25ef5,33353ebf08aa91167f4ecc34b79f082b9460911c..cb33c5fefa9ca15a2c9c9262c2e0b87b9b4fdd9e
@@@ -348,6 -348,16 +348,16 @@@ Specify which types of messages will tr
      </variablelist>
    </listitem>
    </varlistentry>
+   <varlistentry>
+   <term><amkeyword>max-dle-by-volume</amkeyword> <amtype>int</amtype></term>
+   <listitem>
+ <para>Default:
+ <amdefault>1000000000</amdefault>.
+ The maximum number of dle written to a single volume.</para>
+   </listitem>
+   </varlistentry>
    <varlistentry>
    <term><amkeyword>dumpcycle</amkeyword> <amtype>int</amtype></term>
    <listitem>
@@@ -387,6 -397,7 +397,7 @@@ days 
  <amkeyword>runtapes</amkeyword>.</para>
    </listitem>
    </varlistentry>
    <varlistentry>
    <term><amkeyword>tapecycle</amkeyword> <amtype>int</amtype></term>
    <listitem>
@@@ -466,9 -477,11 +477,11 @@@ values
      $c : config name
      $o : org configuration
      $b : barcode of the volume
+     $s : slot number, can specify a minimun number of digit:
+          $3s to get '001'
      $m : meta label
  </programlisting></para>
- <para>The template should contain some number of contiguous '%'
+ <para>The template can contain some number of contiguous '%'
  characters, which will be replaced with a generated number. Be sure to
  specify enough '%' characters that you do not run out of tape labels.
  Example:
  <markup>&quot;$m-%%%&quot;</markup>,
  <markup>&quot;$m-$b&quot;</markup>
  </para>
+ <para>The generared label can be used only if it match the
+ <amkeyword>labelstr</amkeyword> setting. The volume will not be used if the
+ generated label doesn't match the <amkeyword>labelstr</amkeyword> setting.
+ </para>
  <para>Note that many devices cannot distinguish an empty tape from an error
  condition, so it may is often necessary to include
  <amkeyword>volume-error</amkeyword> as an autolabel condition.</para>
@@@ -729,13 -746,23 +746,23 @@@ The algorithm used to choose which dum
    </listitem>
    </varlistentry>
  <varlistentry>
- <term><amkeyword>taper-parallel-write</amkeyword> <amtype>int</amtype></term>
- <listitem>
-   </listitem>
- <para>Default: <amdefault>1</amdefault>.
+   <term><amkeyword>taper-parallel-write</amkeyword> <amtype>int</amtype></term>
+   <listitem>
+     <para>Default: <amdefault>1</amdefault>.
  Amanda can write simultaneously up to that number of volume at any given
  time. The changer must have as many drives.</para>
-   </varlistentry>
+   </listitem>
+ </varlistentry>
+ <varlistentry>
+   <term><amkeyword>eject-volume</amkeyword> <amtype>int</amtype></term>
+   <listitem>
+     <para>Default: <amdefault>no</amdefault>.
+ Set to <amkeyword>yes</amkeyword> if you want the volume to be ejected
+ after Amanda wrote data to it. It works only with some changer and device.</para>
+   </listitem>
+ </varlistentry>
  <varlistentry>
  <term><amkeyword>labelstr</amkeyword> <amtype>string</amtype></term>
  <listitem>
@@@ -833,7 -860,7 +860,7 @@@ How many times the server will resend 
    <term><amkeyword>netusage</amkeyword> <amtype>int</amtype></term>
    <listitem>
  <para>Default:
- <amdefault>8000 Kbps</amdefault>.
+ <amdefault>80000 Kbps</amdefault>.
  The maximum network bandwidth allocated to Amanda, in Kbytes per second.
  See also the
  <emphasis remap='B'>interface</emphasis>
@@@ -2155,8 -2182,8 +2182,8 @@@ the property to set, and the others con
    <term><amkeyword>record</amkeyword> <amtype>boolean</amtype></term>
    <listitem>
  <para>Default:
 -<amkeyword>yes</amkeyword>.
 -Whether to ask the backup program to update its database (e.g. <filename>/etc/dumpdates</filename>
 +<emphasis remap='I'>yes</emphasis>.
 +Whether to ask the backup program to update its database (e.g. <filename>/var/lib/dumpdates</filename>
  for DUMP or <filename>/usr/local/var/amanda/gnutar-lists</filename> for GNUTAR) of time stamps.
  This is normally enabled for daily backups and turned off for periodic archival runs.</para>
    </listitem>
@@@ -2600,7 -2627,7 +2627,7 @@@ A comment string describing this set o
    <term><amkeyword>use</amkeyword> <amtype>int</amtype></term>
    <listitem>
  <para>Default:
- <amdefault>8000 Kbps</amdefault>.
+ <amdefault>80000 Kbps</amdefault>.
  The speed of the interface in Kbytes per second.</para>
    </listitem>
    </varlistentry>
diff --combined server-src/diskfile.h
index aa485a5975f85745a5e05c15709524b6649296e9,28ed50e8edcba795a9623252d1e49dc26b6b3874..9fae30e2a5237cb084e6e2931018754e16eda0c6
@@@ -59,6 -59,7 +59,7 @@@ typedef struct amhost_s 
  
  typedef struct disk_s {
      int               line;                   /* line number of last definition */
+     char       *filename;               /* the filename where it is read */
      struct disk_s *prev, *next;               /* doubly linked disk list */
  
      am_host_t *host;                  /* host list */
      char      *clnt_decrypt_opt;      /* client-side decryption option parameter to use */
      double    comprate[2];            /* default compression rates */
      /* flag options */
 -    int               record;                 /* record dump in /etc/dumpdates ? */
 +    int               record;                 /* record dump in /var/lib/dumpdates ? */
      int               skip_incr;              /* incs done externally ? */
      int               skip_full;              /* fulls done externally ? */
      int               to_holdingdisk;         /* use holding disk ? */
@@@ -163,10 -164,11 +164,11 @@@ char *optionstr(disk_t *dp)
  GPtrArray *validate_optionstr(disk_t *dp);
  char *xml_optionstr(disk_t *dp, int to_server);
  char *xml_estimate(estimatelist_t estimatelist, am_feature_t *their_features);
- char *clean_dle_str_for_client(char *dle_str);
+ char *clean_dle_str_for_client(char *dle_str, am_feature_t *their_features);
  char *xml_application(disk_t *dp, application_t *application,
                      am_feature_t *their_features);
  char *xml_scripts(identlist_t pp_scriptlist, am_feature_t *their_features);
+ char *xml_dumptype_properties(disk_t *dp);
  
  /* disable_skip_disk() set the db->todo flag to 0 for each dle with 'ignore'
   * 'strategy skip'. It is useful for all programs that want to skip them,i