Re: rsync / Include only



In comp.os.linux.misc fritz-bayer@xxxxxx <fritz-bayer@xxxxxx>:

[ using rsync to sync only matched files]

rsync --include '*.xml' --include '*.conf' --include '*.properties'
--exclude '*' -ave ssh example.de:/opt/jboss/server/default/deploy
/backup/

receiving file list ... done
client: nothing to do: perhaps you need to specify some filenames or
the --recursive option?

I seems like the --exclude '*' will exlcude all files.

How do I do an "include only..." ?

Something like this should to the trick:

rsync -avz --include='*/' --include '*.xml' --include '*.conf' \
--include '*.properties' --exclude='*' ...

Adjust to your taste.

Good luck

BTW
Please try below URL(s) before answering, most people aren't
using a browser here to read/write, this is usenet.

http://www.safalra.com/special/googlegroupsreply
http://cfaj.freeshell.org/google

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@xxxxxxxxxx | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 180: ether leak
.