CloudForge continuously backs-up all repository data throughout the day. At the end of each day, if any data has changed from the previous day, we store a new snapshot of your repository. If you would like a near real time backup, or would like incremental backups (mirroring) of your Subversion repository we recommend using 'svnsync'. In this article, we show you how to mirror your SVN repository using svnsync.
You can create a copy of a remote repository on your local machine using the svnsync utility. This utility is part of the standard svn command line package. The following instructions assume that you have already installed this. Note that the examples are on a Unix machine, but the same approximate commands should work with Windows.
- Create a repository on your local machine using 'svnadmin create':
$ svnadmin create local_repo
- Create a pre-revprop-change file in the new repositories 'hooks' directory:
$ vim local_repo/hooks/pre-revprop-change
- Put the following into this new file:
- Make that file executable:
$ chmod +x local_repo/hooks/pre-revprop-change
- Prepare the local repository to receive the sync:
$ svnsync init file:///path/to/local_repo URL_of_remote_repository
- Actually perform the sync:
$ svnsync sync file:///path/to/local_repo
Once this final command completes you will have a complete copy of your Subversion repository on your local system.