Page 1 of 1

rsync: Update folder in SVN without touching ".svn"

Posted: Tue Jan 13, 2015 3:42 pm
by peter_b
I like to keep track of machine setups by storing config stuff in an SVN repository.
For example, the state/config of our current GlusterFS setup, stored in "/var/lib/glusterd".
Unfortunately, when I try to update the folder in SVN using "rsync -avP --delete", the ".svn" subfolders (of course) are deleted, too - making the local SVN copy invalid.

In order to keep the files in sync, but not touching the ".svn" subfolders, add an "--exclude=.svn" clause to rsync:

Code: Select all

$ rsync --exclude=.svn /var/lib/glusterd /path/to/my/repo/glusterd
Works fine :)