Migrating Subversion Repository Using svnsync

October 10, 2011

I have been working with subversion for years but this is the second time I have to perform the moving repository task. The help document sucks, and the help command doesn’t help much to find the correct order of options.

The command is kind of short, but not sure if, in the next time, I would forget again. So, I end up writing this post for further needs.

I’m assuming you already have created new repository somewhere. Let’s say SOURCE_REPO is the current repository you want to move and DETINATION_REPO is the repository you want to migrate from SOURCE_REPO.


# Step 1: setup the initial sync
svnsync init DETINATION_REPO SOURCE_REPO --source-username sousername --sync-username syusername

#Step 2: Issue the sync command
svnsync sync DETINATION_REPO
1
2
3
4
5
# Step 1: setup the initial sync
svnsync init DETINATION_REPO SOURCE_REPO --source-username sousername --sync-username syusername

#Step 2: Issue the sync command
svnsync sync DETINATION_REPO

Actually, you will need to use these args for authentication: (see svnsync help)

--source-username ARG : connect to source repository with username ARG
--source-password ARG : connect to source repository with password ARG
--sync-username ARG : connect to sync repository with username ARG
--sync-password ARG : connect to sync repository with password ARG

Continue Reading ยป