I have been using the --cvs-exclude option on my rsync scripts for a little over a year now. I work with an SVN repository so it keeps the SVN files out of production.
Today I attempted to rsync changes and suddenly rsync wasn't picking anything up from a folder named "core." Upon investigating I found out that "core" is a CVS folder so it gets ignored.
So my question is why rsync worked at all for me, but suddenly today decided to start ignoring the "core" folder like it should be.
I've solved the problem by simply ignoring SVN files instead of using CVS exclude, but am still perplexed as to why rsync worked for up until today.
My old rsync code:
rsync -vcaz --no-p --cvs-exclude --exclude downloader --exclude media --exclude var /var/www/project/ [email protected]:/var/www/project/httpdocs/ | grep -v '/$'
Operating system (Running Xubuntu):
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
rsync version:
rsync version 3.0.8 protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes
Perhaps not a critical question, but it's bothering me nonetheless.
I also ran into the same problem. Rsync excludes the following types of files if -C option is used:
static char default_cvsignore[] =
/* These default ignored items come from the CVS manual. */
"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"
/* The rest we added to suit ourself. */
" .svn/ .git/ .hg/ .bzr/";
"core" files are core dumps for terminated programs, so typically you do not want to copy these files. The problem is when you have, for instance, a directory called "core".
The solution is to use the "--include" option, or create a filtering file containing a rule like:
+ core
and then use "--filter=filename".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With