Reputation: 31
I am setting up an SVN mirror and I followed these steps in sequence:
svnsync synchronize destination source
However I got the error on the last step:
svnsync: Destination repository has not been initialized
I should have run svnsync initialize
after the repository creation but I missed it. Now, as per the svnsync
command, I cannot sync until I initialize but I cannot initialize because I already have revisions committed.
The only option I have is to start from scratch and follow the correct order of steps, but it is time-consuming as I will have to load 200 000+ revisions in the mirror.
Is there a workaround to the problem?
Upvotes: 2
Views: 2997
Reputation: 181
you can use the option "--allow-non-empty" (as of svn 1.7 atleast)
svnsync initialize dest source --allow-non-empty
however all the commits of the destination should be in source (it's okay if there are more commits in the source, they will get synched the first time you do 'synchronize').
Upvotes: 1
Reputation: 52659
The other way to do it is to start a sync with a clean backup repo, then stop it and copy the dump over the top. The information controlling the sync is stored in revision/revprop 0. Look at it before and after you copy the dump over and you'll be able to update it manually. Its a bit of a hack but its straightforward. You'll need to change the last updated revision number accordingly, or it'll try to sync all revisions.
Upvotes: 0