Hi Kirk,

include works only at one level directory unless you try this untested
patch.

Jean-Louis

On Thu, Feb 20, 2003 at 07:57:38PM -0600, Kirk Strauser wrote:
> I've been tinkering with my disklist entries.  Right now, I'm using the
> following setup to split a very large filesystem into a few manageable
> chunks:
> 
>     # Special large directories
>     kanga.honeypot.net        /usr/share                      
>compressed-tar-with-excludes    -1      local
>     kanga.honeypot.net        /usr/share/media                
>uncompressed-tar-with-excludes  -1      local
>     kanga.honeypot.net        /usr/share/media/music/albums   uncompressed-tar       
>         -1      local
>     kanga.honeypot.net        /usr/share/media/music/singles  uncompressed-tar       
>         -1      local
> 
> using the following dumptypes:
> 
>     #### Tar backups with exclude files
> 
>     define dumptype uncompressed-tar {
>         root-tar
>         priority medium
>     }
> 
>     define dumptype compressed-tar {
>         uncompressed-tar
>         compress client fast
>     }
> 
>     define dumptype uncompressed-tar-with-excludes {
>         uncompressed-tar
>         comment "Non-root partitions without compression, plus an exclude list"
>         exclude list ".amanda.excludes"
>     }
> 
>     define dumptype compressed-tar-with-excludes {
>         compressed-tar
>         comment "Non-root partitions without compression, plus an exclude list"
>         exclude list ".amanda.excludes"
>     }
> 
> 
> Since this setup has been working perfectly for months, I feel obligated to
> start tampering with it.  I was looking at the example disklist that ships
> with Amanda, and decided to try the following syntax instead:
> 
>     # /usr/share, minus ./media
>     kanga.honeypot.net share /usr/share {
>             comp-user-tar
>             exclude "./media"
>             } -1 local
> 
>     # /usr/share/media, minus ./music/{albums,singles}
>     kanga.honeypot.net share-media /usr/share {
>             user-tar
>             include "./media"
>             exclude "./media/music/albums" "./media/music/singles"
>             } -1 local
> 
>     # /usr/share/media/music/albums
>     kanga.honeypot.net share-albums /usr/share {
>             user-tar
>             include "./media/music/albums"
>             } -1 local
> 
>     # /usr/share/media/music/singles
>     kanga.honeypot.net share-singles /usr/share {
>             user-tar
>             include "./media/music/singles"
>             } -1 local
> 
> 
> This seems to me like it should work, but when I run amcheck to test it, I
> get:
> 
>     Amanda Backup Client Hosts Check
>     --------------------------------
>     ERROR: kanga.honeypot.net: [No include for 'share-singles']
>     ERROR: kanga.honeypot.net: [No include for 'share-albums']
>     Client check: 2 hosts checked in 0.525 seconds, 4 problems found
> 
>     (brought to you by Amanda 2.4.3)
> 
> 
> What the heck does 'No include for ...' mean?  I found the string in an
> Amanda source file, but couldn't make heads or tails of its significance.  A
> quick Google returned nothing.
> -- 
> Kirk Strauser
> In Googlis non est, ergo non est.



-- 
Jean-Louis Martineau             email: [EMAIL PROTECTED] 
Departement IRO, Universite de Montreal
C.P. 6128, Succ. CENTRE-VILLE    Tel: (514) 343-6111 ext. 3529
Montreal, Canada, H3C 3J7        Fax: (514) 343-5834
--- /u/martinea/amcore/amanda-2.4.3/client-src/client_util.c    2003-01-02 
20:05:56.000000000 -0500
+++ client-src/client_util.c    2003-01-05 17:31:36.000000000 -0500
@@ -193,28 +193,32 @@
        return 0;
     }
     else {
-       char *glob;
-       char *regex;
-       DIR *d;
-       struct dirent *entry;
-
-       glob = ainc+2;
-       regex = glob_to_regex(glob);
-       if((d = opendir(device)) == NULL) {
-           dbprintf(("%s: Can't open disk '%s']\n",
-                     debug_prefix(NULL), device));
-           if(verbose)
-               printf("ERROR [Can't open disk '%s']\n", device);
-           return 0;
+       char *incname = ainc+2;
+       if(strchr(incname, '/')) {
+           fprintf(file_include, "./%s\n", incname);
        }
        else {
-           while((entry = readdir(d)) != NULL) {
-               if(is_dot_or_dotdot(entry->d_name)) {
-                   continue;
-               }
-               if(match(regex, entry->d_name)) {
-                   fprintf(file_include, "./%s\n", entry->d_name);
-                   nb_exp++;
+           char *regex;
+           DIR *d;
+           struct dirent *entry;
+
+           regex = glob_to_regex(incname);
+           if((d = opendir(device)) == NULL) {
+               dbprintf(("%s: Can't open disk '%s']\n",
+                     debug_prefix(NULL), device));
+               if(verbose)
+                   printf("ERROR [Can't open disk '%s']\n", device);
+               return 0;
+           }
+           else {
+               while((entry = readdir(d)) != NULL) {
+                   if(is_dot_or_dotdot(entry->d_name)) {
+                       continue;
+                   }
+                   if(match(regex, entry->d_name)) {
+                       fprintf(file_include, "./%s\n", entry->d_name);
+                       nb_exp++;
+                   }
                }
            }
        }

Reply via email to