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

jw schultz jw at
Wed Jul 30 19:24:19 EST 2003

Please buy a carriage return key before posting again.

On Wed, Jul 30, 2003 at 03:41:53AM -0500, Stanisa Amidzic wrote:
> 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.

The --exclude, --include, and --exclude-from and
--include-from options all append to the pattern list.  List
order matters.  I'd suggest you read the EXCLUDE PATTERNS
section of the manpage with special emphasis patterns
starting with "+ " and "- ".

	J.W. Schultz            Pegasystems Technologies
	email address:		jw at

		Remember Cernan and Schmitt

More information about the rsync mailing list