Hi Guys, I'm backuping my home dir with rsync since 1 1/2 years, which is quite nice (I'm using the link-dir option). Now I started to use subversion and don't like that rsync is making backups of the checked-out working dirs. First I put all wd's in one folder (~/tmp) and put this on an exclude list. But now I'm use subversion on other locations as well, for example ~/bin, but also on several other. Because I making backups from the subversion repository already, I'd like to skip all working dirs, everywhere in my home dir. I naive try with a filter rule like "- .svn/../", which should exclude all parent dirs of the '.svn' dirs, doesn't work. Ok, this does not suprise me. Is there any fast and good way to do this without writting a script which scan for the dirs, which would be the alternative. ( for example: rsync ${OPTIONS} --filter=._<(cd $FROM && find -type d -name .svn -printf "%h\n" | sed 's_\./_- _') $FROM $TO ) Thanks, Martin
On Sun, 2006-04-02 at 17:04 +0100, Martin Scharrer wrote:> I naive try with a filter rule like "- .svn/../", which should exclude all > parent dirs of the '.svn' dirs, doesn't work. Ok, this does not suprise me.Right, because rsync matches the pattern against the canonical path to each file it finds instead of following the pattern in the filesystem in all possible ways. The filter rule with a double slash that someone recently tried to use failed for the same reason.> Is there any fast and good way to do this without writting a script which scan > for the dirs, which would be the alternative. > ( for example: > rsync ${OPTIONS} --filter=._<(cd $FROM && find -type d -name .svn -printf > "%h\n" | sed 's_\./_- _') $FROM $TO > )That technique is probably best. Something else you might try: name all working copies from repositories that you back up separately with a suffix like -wc or -svn so that a single exclude rule can match them all. -- Matt McCutchen hashproduct@verizon.net http://hashproduct.metaesthetics.net/