scheme:
- we will create our repository in /root/svnrepo_etc.
- /etc will be the working directory.
initial setup:
- create our svn repo. the svn repository is addressed using a URL.
# svnadmin create file:///root/svnrepo_etc
- add the config files to the repo. (you can also add files selectively instead of the whole /etc dir.)
# svn import /etc file:///root/svnrepo_etc -m "etc repo is born"
- make /etc a working copy. (sorry, i can't think of a less convoluted way to do this)
# svn checkout --force file:///root/svnrepo_etc /etc
ready for action:
# svn info
# svn log
# cd /etc
- ok, now lets modify rc.conf
# echo "# test" >> rc.conf
- check for (as yet uncommited) changes made to the files in /etc
# svn status
- check what we have modified in rc.conf. (compare working copy with last commited ver.)
# svn diff rc.conf
- lets now commit rc.conf to the repo. (note: always use good descriptive messages.)
# svn commit -m "just testing svn, no real change was commited" rc.conf
- check all the revisions of a file
# svn log rc.conf
- show differences b/w revision 1 and 2
# svn diff -r1:2 rc.conf
- show rev. 2 of the file
# svn cat -r2 rc.conf | less
- go back to revision 1
# svn update -r1 rc.conf
- discard as yet uncommited changes
# svn revert rc.conf
backup strategy:
- just save a copy of the /root/svnrepo_etc directory.
hopefully this is enough to get you started.
further reading:
http://svnbook.red-bean.com/en/1.5/index.html