All is in the subject. An example below, on stable debian. Regards, Antony [0]root@debian-lenny32:/tmp # tree . |-- a | |-- file2 | |-- file3 | |-- logs | | `-- log1 | `-- tags | `-- file1 |-- b `-- rsync_exclude.txt 4 directories, 5 files [0]root@debian-lenny32:/tmp # cat rsync_exclude.txt /logs [0]root@debian-lenny32:/tmp # rsync -azC --force --delete --progress --exclude-from=rsync_exclude.txt a/ b sending incremental file list ./ file2 2 100% 0.00kB/s 0:00:00 (xfer#1, to-check=1/3) file3 2 100% 1.95kB/s 0:00:00 (xfer#2, to-check=0/3) sent 142 bytes received 53 bytes 390.00 bytes/sec total size is 4 speedup is 0.02 [0]root@debian-lenny32:/tmp # tree . |-- a | |-- file2 | |-- file3 | |-- logs | | `-- log1 | `-- tags | `-- file1 |-- b | |-- file2 | `-- file3 `-- rsync_exclude.txt 4 directories, 7 files
You do understand the implications of all the command line switches you're passing to rsync, right? Quoting from the manpage: -C, --cvs-exclude This is a useful shorthand for excluding a broad range of files that you often don't want to transfer between systems. It uses a similar algorithm to CVS to determine if a file should be ignored. The exclude list is initialized to exclude the following items (these initial items are marked as perishable -- see the FILTER RULES section): RCS SCCS CVS CVS.adm RCSLOG cvslog.* tags TAGS .make.state .nse_depinfo *~ #* .#* ,* _$* *$ *.old *.bak *.BAK *.orig *.rej .del-* *.a *.olb *.o *.obj *.so *.exe *.Z *.elc *.ln core .svn/ .git/ .bzr/ [...] As you can see, "tags" is included in the list of things to exclude when using -C, hence rsync is working exactly the way you asked it to.
Thanks, Paul.
Sorry if you had a sad morning Paul ! I do not read rsync manual each day of my life. I should read it each time I have a problem, my fault. I should read it each time I have a problem, my fault. I should read it each time I have a problem, my fault. I should read it each time I have a problem, my fault. I should read it each time I have a problem, my fault. I should read it each time I have a problem, my fault. ... Regards, Antony
I'll also mention that you can ask rsync to include directories named "tags" via --include=tags/ and it will then only exclude files named "tags" (via -C). The rules injected by -C come at the end of the rules (by default) so, any exclude/include rules you specify will override -C rules.