One last question..

Donovan Baarda abo@minkirri.apana.org.au
Tue, 9 Apr 2002 11:07:28 +1000


On Tue, Apr 02, 2002 at 09:48:38PM -0800, Ben Escoto wrote:
> 
> Ok, thanks for all the input; next step is to look at Donovan's code
> and write some documentation.  Then we can see if there are any
> practical difficulties or things that should be improved.  But first
> an intuition pump (multiple choice):

Feel free to ask me if you want anything done...

> 
> What should:
> 
>    rdiff-backup --include /usr/local /usr /backup
> 
> do?
> 
> 
> A.  Back up all of /usr to /backup, same as "rdiff-backup /usr /backup"
> 
> B.  Exit with an error
> 
> C.  Back up only /usr/local to /backup/local, like
>     "rdiff-backup --include /usr/local --exclude ** /usr /backup"
> 
> D.  Other (please specify)

This depends on whether you have "include by default" or "exclude by
default". I believe rsync and dirscan.py both use "include by default", in
which case a single --include has no affect (ie A.). 

The other issue is shouldn't include/exclude lists be relative to the "base
directory" of the backup? In the above, if you wanted the --include to refer
to /usr/local, you should have used;

  "rdiff-backup --include /local /usr /backup"

To achieve C. you would use;

  "rdiff-backup --include /local --exclude ** /usr /backup"
  
> I'm kind of partial to (B), and if this is a problem for anyone maybe
> we could add another switch to make it do (A).

I don't like B because it comes down to determining if the supplied
include/exclude list is meaningful or not. This is very hard to determine.
You an try to catch some cases, but it gets exponentialy more difficult to
catch more subtle ones. For example (using shorthand +/- syntax);

-** +/local	  	    exludes everything
+/local -/share/**	    include redundant, matches no following excludes
+** -/local		    exclude redundant, matches earlier include

-- 
----------------------------------------------------------------------
ABO: finger abo@minkirri.apana.org.au for more info, including pgp key
----------------------------------------------------------------------