Hi, I've come across a situation with rsync which seems like a bug. I could not find anything listed in bugzilla so am writing to the list to see if it's just me. I have a situation where I would like to upload some auto-generated files to a website. However, I don't want these files to be included in my CVS repository so I have added them to a .cvsignore file. To save from creating a monstrous --exclude regex, I'm using the --cvs-exclude option. Unfortunately, these files which I want to sync with my remote website are also excluded. Looking to the documentation, it seems to me that if I put an --include option before the --cvs-exclude option, I should be able to tell rsync to sync those files. However, I'm not having any luck. It appears rsync is ignoring my --include option and outright excluding all CVS matches. I also tried using a file that is in the default list; this also failed. Here's the command I'm using: rsync --dry-run --include "/public_html/admin/test.exe" -C -avzub -e ssh <local_dir> <remote_dir> Is this a bug or a misunderstanding? I'm using rsync v2.6.3 on Debian Sarge. Thanks, William -- Knowmad Services Inc. http://www.knowmad.com
On Wed, Feb 02, 2005 at 12:25:05PM -0500, William McKee wrote:> Looking to the documentation, it seems to me that if I put an --include > option before the --cvs-exclude option, I should be able to tell rsync > to sync those files.Manually specified --include/--exclude options always override the rules read in from -C processing in 2.6.3. So, if the --include option isn't working, it is likely that you didn't anchor the pattern properly. Since you didn't mention the actual source/destination paths in your command-line, I can't tell you exactly how to fix it, but you should be able to just eliminate the directories from the start of the include that are not a part of the transferred hierarchy and all should be well. ..wayne..