rsync command exclude option

Paul Slootman paul+rsync at
Fri Jul 24 02:45:03 MDT 2009

On Fri 24 Jul 2009, Kaushal Shriyan wrote:
> I have a question about rsync. under /etc/ha.d/ there is a directory
> called resource.d
> I want to exclude it i have /etc/ha.d/resource.d in exclude.txt
> when i run rsync -av /etc/ha.d --exclude-from=exclude.txt
> I still see resource.d being rsynced too on the destination host
> Am i missing something ?

Yes, the fact that excludes should be stated relative to the root of the
source.  In your case, that's /etc (not including ha.d because it has no
trailing slash).

You should exclude /ha.d/resource.d/


More information about the rsync mailing list