views:

36

answers:

2

I have a repository I'm migrating to a new subversion server using svnadmin dump and load. I'm doing this in 2 goes, as outlined in the steps below:

  • repoX is at revision 100
  • I perform an svnadmin dump repoX > repoX.dump
  • I perform an svnadmin create repoX on the new server
  • I perform an svnadmin load repoX < repoX.dump on the new server

This all works so far, and svnadmin verify says all is ok. Next I try to get the new repo up to date (this is prior to a final cut off, still testing at this stage).

  • Next I perform an svnadmin dump repoX -r 101:head --incremental > repoX.dump
  • I perform an svnadmin load repoX < repoX.dump on the new server once again

Then I get an error, saying that some path in repoX doesn't exist. So I tried the incremental dump again using:

  • svnadmin dump repoX -r 100:head --incremental > repoX.dump

This time it works and it verified ok.

However.... there are other repos, repoY for example. When I try the second mechanism (going to revision 100 in the first dump, then getting an updated dump from revision 100) I get another error, saying directory already exists! Some repositories work one way, some work the other, all of them don't work when I do it the same way.

So what I want to know is, the correct mechanism from dumping to revision 100 (eg), then dumping the rest of the repos to the head in the second sweep. I've spent the morning reading, reading and reading, but I can't even find an example of what I'm doing, even though I know it can be done.

I can't cut over doing a single dump file as we're talking about 150gb worth of data spread across 50 repos, which physically can't be dumped, transferred and loaded in one night. This mechanism is ensuring we can move 95% of the data prior to the final cutover... but it looks like my theory might be flawed.

If you want any more info just ask.

Thanks

+1  A: 

If the server is live while you dump, is it possible that a commit was made between?

  • repo is at rev 100
  • svnadmin dump

How are you determining which revision to start from? Querying the source repo before dumping, after dumping, inspecting the dump file, or from the destination repo after loading?

Ben Voigt
>>If the server is live while you dump, is it possible that a commit was made between?Possibly. The dump was from 2 weeks ago, so I'm assuming there have been commits made (if there hasn't been, then it gives a 0 sized dump file which I ignore). >> How are you determining which revision to start from? The revision the new server reports after the initial svnadmin load. Is that ok?Do you know which mechanism works?Dumping from 0 - 100, then re-dumping from 101-head?ORDumping from 0 - 100, then redumping from 100-head?
Luke
Sorry, I didn't realise the formatting wouldn't work when commenting.
Luke
Some formatting works, most doesn't. Anyway, the documentation http://svnbook.red-bean.com/en/1.1/ch05s03.html#svn-ch-5-sect-3.5 says that the incremental dump is created as a diff against the revision before the range starts. So 0-100 should be followed by 101-HEAD.
Ben Voigt
That's what I found worked in the end. I'm not sure why this was giving me grief first time around. Thanks again Ben
Luke
A: 

Alright. I started the whole process again in a test region, and it seemed to work ok. I will continue testing today, but at this stage it looks like it's working. Who knows what I did initially to cause those errors.

Thanks for your time Ben.

Luke