On 10Nov2008 09:56, L yuanlux@gmail.com wrote: | I use rsync to sync a mirror site. I wnat to exclude files that were created | more than 10 days ago. I have a long list of excludes in a file. But I want | a dynamic option. | what is the option for this in rsync ?
As far as I'm aware there isn't one. The include/exclude stuff is entirely pathname based. I have in the past done a recursive _listing_ of a mirror site, chosen files out of that, and constructed an include/exclude file on that basis. This was automated with a script.
In my case the example was a GNU archive with multiple versions of packages; I wished only to mirror the "latest" package.
If you can construct (via, perhaps, "rsync -n" and some postprocessing) a list of the remote files that you want, or do not want, it is a pretty easy task to convert that into an include/exclude list automatically. Then you just use that in a wrapper script for calling rsync.
Cheers,