Move Google SVN Repository To Local Server

On February 16, 2015, in Other Online Technology, by James Liu

In last year, I set up my personal SVN server with VisualSVN and Microsoft One Drive. Currently, the system is running quite well. Therefore, I decide to move all my Google SVN Repository project to my personal SVN server. Bascially, moving a SVN repository from one server to another server is a very simple job. You can easily backup the repository and restore it on the new server. However, Google doesn’s allow you to remote login their server and run svnadmin dump command. The command svnadmin dump doesn’t work with URL. So I have to find a way to backup Google SVN repository and restore it to my local server.

svnadmin dump

The solution to backup the Google SVN repository to local is creating a local SVN repository and synchronizing it with Google SVN repository. Here are the steps:
Step 1. Create a new repository

svnadmin create c:/svn/repository

Step 2. Add a “pre-revprop-change” hook to the local repository

echo > c:\svn\repository\hooks\pre-revprop-change.cmd

If you are working in Linux, you need to run following command for Step 2. (Not Tried)

echo ‘#!/bin/sh’ > repository/hooks/pre-revprop-change
chmod +x repository/hooks/pre-revprop-change

If you are using VisualSVN Server in Windows, you can omit step 1 and step 2. Just create a new repository in VisualSVN Tool.
create a new repository

3. Synchronize your new repository with the remote one:

svnsync init file:///c:/svn/repository
svnsync sync file:///c:/svn/repository

In this process, you must make sure you create a new repository and synchronize it with remote repository. Otherwise, it won’t work and it may give you following error message:

Cannot initialize a repository with content in it

Dump a SVN repository from a URL
Build A SVN Backup System With Microsoft OneDrive
How to Backup and Mirror a Subversion Repository


Leave a Reply


WordPress Blog