Hi John,

This simple patch should do a better job, but it should be configurable
by an option in the configuration file:
    eg. taping_level [full|incr|all]

Jean-Louis

On Fri, Mar 19, 2004 at 12:00:16PM -0500, Jonathan Dill wrote:
> I have attached a very simple but effective script that I set up to
> separate full and incremental holding disk files, so that full dumps can
> be flushed to tape while incrementals remain on disk. The script is
> almost so simple as to be a joke, but I don't have any idea what kind of
> bugs can be found.
> 
> WARNING: The script is provided as-is with no warranty express or
> implied. If you screw up your amanda backups do not come crying to me.
> To really make the script work, you will need to change the values of $r
> and $i for your configuration, run it to see what it will do, and then
> remove the "echo" from the beginning of the two lines. If you can't
> figure out what that means, then you probably shouldn't be screwing
> around with this stuff anyway and should forget about it.
> 
> For restores, I think I can flush the latest batch of full dumps, then
> use a modified amanda.conf that looks in the directory where the
> incrementals are stored, but I am not sure how amanda decides where
> holding disk files are located.  I might have a use another script to
> move the incrementals back to the normal holding disk tree, but I will
> cross that bridge when I come to it, to use a rather hackneyed
> expression.
> 
> -- 
> Jonathan Dill <[EMAIL PROTECTED]>

> #!/bin/tcsh -f
> set r=(/snap/amanda-hd)
> set i=(/snap/amanda-incr)
> cd $r
> set dl=(`find . -depth -type d -print`)
> cd $i
> foreach d ($dl)
>   if (! -d $d) then
>     echo mkdir -p $d
>   endif
> end
> cd $r
> foreach d ($dl)
>   set fl=(`find . -type f \! -name "*.0" -print`)
>   foreach f ($fl)
>     echo mv $f $i/$f
>   end
> end


-- 
Jean-Louis Martineau             email: [EMAIL PROTECTED] 
D�partement IRO, Universit� de Montr�al
C.P. 6128, Succ. CENTRE-VILLE    Tel: (514) 343-6111 ext. 3529
Montr�al, Canada, H3C 3J7        Fax: (514) 343-5834
diff -u -r --show-c-function --exclude-from=amanda.diff 
amanda-2.4.5b1.orig/server-src/amflush.c amanda-2.4.5b1.new/server-src/amflush.c
--- amanda-2.4.5b1.orig/server-src/amflush.c    2003-06-05 13:06:20.000000000 -0400
+++ amanda-2.4.5b1.new/server-src/amflush.c     2004-03-19 12:40:17.000000000 -0500
@@ -276,6 +276,7 @@ char **main_argv;
 
        dp = lookup_disk(file.name, file.disk);
        if (dp->todo == 0) continue;
+       if (file.dumplevel != 0) continue;
 
        fprintf(stderr,
                "FLUSH %s %s %s %d %s\n",
diff -u -r --show-c-function --exclude-from=amanda.diff 
amanda-2.4.5b1.orig/server-src/driver.c amanda-2.4.5b1.new/server-src/driver.c
--- amanda-2.4.5b1.orig/server-src/driver.c     2004-02-13 09:03:36.000000000 -0500
+++ amanda-2.4.5b1.new/server-src/driver.c      2004-03-19 12:40:32.000000000 -0500
@@ -1126,7 +1126,8 @@ void handle_dumper_result(fd)
               dp->host->hostname, dp->name);
        fflush(stdout);
 
-       enqueue_disk(&tapeq, dp);
+       if(sched(dp)->level == 0)
+           enqueue_disk(&tapeq, dp);
        dp = NULL;
 
        startaflush();
diff -u -r --show-c-function --exclude-from=amanda.diff 
amanda-2.4.5b1.orig/server-src/planner.c amanda-2.4.5b1.new/server-src/planner.c
--- amanda-2.4.5b1.orig/server-src/planner.c    2004-02-13 09:01:08.000000000 -0500
+++ amanda-2.4.5b1.new/server-src/planner.c     2004-03-19 12:43:14.000000000 -0500
@@ -536,7 +536,9 @@ char **argv;
        for(holding_file=holding_list->first; holding_file != NULL;
                                       holding_file = holding_file->next) {
            get_dumpfile(holding_file->name, &file);
-           
+
+           if (file.dumplevel != 0) continue;
+
            fprintf(stderr,
                    "FLUSH %s %s %s %d %s\n",
                    file.name,

Reply via email to