Gilson Soares wrote:> I'd like to replicate a directory structure but only copying
> *.<anything> files.
>
> rsync -a --include="*.rrd" --exclude="*" /var/www/html
> taurus::pegasusdata/var-www-html
>
> Didn't work.
>
> One additional issue is *.rrd files only exists 2 levels bellow
> /var/www/html/, not in /var/www/html itself.
>
> Do I missed something ?
Yep, you excluded everything (including subdirs) that doesn't match *.rrd.
So
rsync never got into the subdirs to see the *.rrd files inside them.
Try: --include="*.rrd" --include="**/"
--exclude="*". That middle include will
include all subdirs, down to any depth in the tree (**).
Max.