Excluding most and including some problems continue.
Ian Skinner
iskinner at cdpr.ca.gov
Thu Sep 30 09:27:23 MDT 2010
Here is my rsync command as it currently stands.
/usr/local/bin/rsync -vvv --stats -Pzrtpl --delete --password-file=/export/home/webuser/.appprod --log-file=/export/home/webuser/logs/rsync-log -F /export/home/ webuser at appprod::dprweb_extranet/ > rsync-test
Here is the current .rsync-filter file.
+ das
+ em
+ enf
+ internal
+ itb
+ medtox
+ pml
+ psb
+ reg
+ whs
+ htdocs
+ docs
- /*
- das/*
- em/*
- enf/*
- internal/*
- itb/*
- medtox/*
- pml/*
- psb/*
- reg/*
- whs/*
- htdocs/*
This is doing pretty close to what I want it to do. Which is to mirror only the */htdocs/docs* in each of the ten directories (das,em,enf,etc.) in the base path of */export/home* and exclude the rest.
Unfortunately there are some subdirectories in some of these selected */htdocs/docs* directories that are unintentionally being excluded by these rules. I.E. */export/home/enf/htdocs/docs/county/internal/*.
[sender] hiding file enf/htdocs/docs/county/internal/gis0402.pdf because of pattern internal/* [per-dir .rsync-filter]
[sender] hiding file enf/htdocs/docs/county/internal/gis1201.pdf because of pattern internal/* [per-dir .rsync-filter]
[sender] hiding directory enf/htdocs/docs/county/internal/gis1201 because of pattern internal/* [per-dir .rsync-filter]
[sender] hiding directory enf/htdocs/docs/county/internal/gis0402 because of pattern internal/* [per-dir .rsync-filter]
Is there an easy way to remedy this in the base .rsync-filter file and|or the rsync command? Someway to say only exclude the base */export/home/internal/* directory, not any lower "internal" directories? OR is the only way to create sub .rsync-filter files in other directories? My concern with the latter option is that users are in control of these directories and can add and modify them at will. If I find all the special cases today, this is no guarantee that there won't be more special cases tomorrow.
More information about the rsync
mailing list