Another Question about include-from

jw schultz jw at pegasys.ws
Sat Sep 6 09:12:07 EST 2003


On Fri, Sep 05, 2003 at 05:16:11PM -0500, Max Kipness wrote:
> I know this subject has been discussed time and time again, but
> everytime I think I've figured it out, I get stuck again.
> 
> Here is the file structure, root is /:
> 
> /var
> /etc
> /otherdir1
> /otherdir2
> 
> I want to rsync the following:
> 
> /var/spool/mail
> but nothing else in /var or /var/spool/
> /etc/httpd/
> /etc/mail/
> but nothing else in /etc
> 
> Do I have to do this for example?
> + /var/
> +/var/spool/
> + /var/spool/mail/
> - /var/spool/dir1
> - /var/spool/dir2
> - /var/spool/dir3
> - /var/dir1
> - /var/dir2
>  -/etc, etc
> -/*

You are close but not quite there.

+ /var/
+ /var/spool/
+ /var/spool/mail
- /var/spool/*
- /var/*
+ /etc/httpd/
+ /etc/mail/
- /etc/*
- /*

A little simpler and more orthogonal.

> And exclude every other dir at that level? Is there not a better way? Is
> this what the --files-from patch is for?

--files-from would probably be applicable.

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt



More information about the rsync mailing list