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

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
peter_b
Chatterbox
Posts: 371
Joined: Tue Nov 12, 2013 2:05 am

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

Post 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 :)
Post Reply