Make rsync exclude subversion working directories
Martin Scharrer
martin at scharrer-online.de
Sun Apr 2 16:04:22 GMT 2006
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
More information about the rsync
mailing list