Usage of --exclude and --include-from options

Stanisa Amidzic stanisa at iname.com
Wed Jul 30 18:41:53 EST 2003


I am using rsync 2.5.6 on the client side and 2.5.4 on the server side. I am trying to syncronise files and dirs on the client with the files on the server, but only a subset of files are located on the server, and I wish to leave all other files on the client machine untouched. This would be easy if all the files on the server were under one dir, but they are spread across multiple dirs. Below is the syntax I've tried:

rsync -a --force --delete --delete-after -P --exclude=/ --include-from=/etc/rsync_inc user at machine::module-name/ /

Here is a small section of /etc/rsync_inc
/tmp/squid/error_url
/etc/pppoe.conf
/usr/local/squid/etc/squid.conf

This above rsync command updates nothing because --exclude seems to override --include-from option. Without the --exclude option though, rsync updates the files in --include-from file, but then starts deleting files on the client side, as they don't exist on the server side, eventually deleting most of the files on the client side except the ones listed in etc/rsync_inc.

I know that this would be possible calling rsync multiple times for each entry in the /etc/rsync_inc, but because this will be used over a dial-up connection, I am hoping to minimise the traffic and admin requirements. Can anyone suggest a way around this? Muchly appreciated...
-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search
http://corp.mail.com/careers




More information about the rsync mailing list