rsyncing Maildirs

jw schultz jw at pegasys.ws
Thu Nov 6 21:18:38 EST 2003


On Thu, Nov 06, 2003 at 10:48:37AM +0100, Snorre Narum Garmann wrote:
> Hi
> 
> I'm trying to take a backup of all the users emails on a server using rsync,
> but there is probably something about the patterns I haven't understood
> quite.
> 
>  
> 
> Every user has a folder called Maildir in their home directory.
> 
>  
> 
> So the structure is like this:
> 
> /home/user1/Maildir
> 
> /home/user2/Maildir
> 
> etc.
> 
>  
> 
> I'm not interested in backing up the other folders that the users might
> have.
> 
>  
> 
> The "mailbackup" share points to the /home folder so I'm trying the
> following without success:
> 
>  
> 
> rsync -av --include "/*/Maildir/**" --exclude "*" -recursive
> server::mailbackup .
> 
>  
> 
> This backs up nothing. Why doesn't this work? Could anyone enlighten me?

Because you failed to include the parent directories all the
way up the line.  Read the manpage section on EXCLUDE
PATTERNS.  I'd use --exclude-from because you will need more
patterns than one normally wants on the command-line.

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

		Remember Cernan and Schmitt



More information about the rsync mailing list