Problem with exclude folders

Mirko Hufnagel mirko at linuxart.de
Thu Mar 19 15:26:43 GMT 2009


Hi rsync list!

I have a problem with the exclude-from and include-from options.

I want sync all jpeg files to an external server - exclude HK and texts 
folders and jpg inside this folders.

My folder structure are:

/products/ANYNAME/pictures/EU
/products/ANYNAME/pictures/HK
/products/ANYNAME/texts
...

my include-from file:

*/
*.JPG
*.jpg

my exclude-from file:

*/HK/
*/texts
*

my rsync command:

rsync -rvz -W --force --size-only --delete --delete-excluded 
--include-from=/etc/rsyncfiles.txt --exclude-from=/etc/rsyncexcludes.txt 
  -e 'ssh -C -p 1000' '/srv/fileserver/products/current product range' 
IP:/var/products

Problem 1) all jpeg are copied to the external server - also the jpegs 
from HK folders. But I only want jpegs from the EU and other folders.

Problem 2) an empty texts folder was created on the external server - 
but I don't want this.

Is there any solution for my 2 problems? I invest now over 5 hours to 
google, rtfm and "try and error" - but I think im too stupid to find the 
right way.

Many many thanks!

Mirko Hufnagel


More information about the rsync mailing list