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 172.20.0.3:/root/ttt/
--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/
Paul