Wednesday, July 10, 2013

Setting up the Subversion Sync between two Server (Primary-Secondary)


I assume that you have working Primary Subversion Server.  I also assume that you have new Subversion Server that would act as a Secondary Server. All the action should be done on Secondary Server.

Primary Server: https://svn.vaseem/svn/reponame/
Secondary Server: https://svn.vaseem2.com/svn/reponame/
     
1.  Create the repo (claimcolony) with the following command or by GUI
svnadmin create "C:\Repositories\reponame”
we can check the revision and other information by the following command
svn info https://svn.vaseem.com/svn/reponame/
Path: igdbatchtool
URL: https://svn.vaseem/svn/xyzrepo
Repository Root: https://svn.vaseem/svn/xyzrepo
Repository UUID: aaac7bac-4d54-a44b-87f7-7681aaadcd9b
Revision: 0
Node Kind: directory
Last Changed Rev: 0
Last Changed Date: 2012-07-06 05:55:11 -0700 (Fri, 06 Jul 2012)
   
2.  Check the UUID of created repo with
svn info https://svn.vaseem/svn/xyzrepo/

set the same UUID for the newly created repo as of Primary repo by command

svnadmin setuuid  /path/of/repo/  UUID of Primary repo
svnadmin setuuid "D:\Repositories\xyzrepo" db5423f0-d7e9-4b4a-b701-935fb5d42e4b
     
3.  Initialize the sync from Primary repository by the below command
svnsync initialize DEST_URL SOURCE_URL
this will throw errors so we need to go to the mirror (secondary) repo and need to change the pre-revporp-change hook to change so that it can accept the change



















Now initialize the sync for repository
svnsync initialize DEST_URL SOURCE_URL
svnsync initialize https://svn.vaseem.com/svn/xyzrepo/
https://svn.vaseem2.com/svn/xyzrepo/

Now start sync
svnsync sync DEST_URL SOURCE_URL

svnsync sync https://svn.vaseem.com/svn/xyzrepo/
https://svn.vaseem2.com/svn/xyzrepo/
this will start syncing…





No comments:

Post a Comment