I'm trying to recover a remote Subversion repository onto my local machine. I do not have direct access to the server to run shell commands, but I do have full svn permissions on the repository itself.
Due to some kind of issue we have yet to identify, neither svnsync nor svndump nor anything else I've tried succeeds when run against the entire repository at once. Sometime during the operation, it will fail with a message like "connection timed out" or "cannot access chunk", or similar messages. We haven't been able to find the source of the problem, it could be a software issue on the server, a corrupt repository, or perhaps just an unreliable network connection. No matter what the issue, the person who controls the server has been very slow to help us resolve the problem, so we're trying to work around it if we can.
I was able to do dumps of the server in batches of revisions. I ran a series of commands similar to these to get partial dumps like this:
svnrdump dump -r0:499 https://server/svn/respository > 0-499.dump
svnrdump dump -r500:999 https://server/svn/respository > 500-999.dump
svnrdump dump -r1000:1499 https://server/svn/respository > 1000-1499.dump
This allowed me to push through the server issues. When a dump timed out or had other issues, I just retried that portion until it worked, or used a smaller increment. Now I have a number of dump files that together represent the entire repository.
My question is: how can I combine these separate dumps into a single local repository?
I've tried doing this with an empty local repository:
svnadmin load repository < 0-499.dump
svnadmin load repository < 500-999.dump
The first command works, but the second one fails. The error message suggests that it's trying to add a file that already exists, and it gives up. I have found that I can do this instead:
svn mkdir batch1
svnadmin load --parent-dir "batch1" repository < 0-499.dump
svn mkdir batch2
svnadmin load --parent-dir "batch2" repository < 500-999.dump
This successfully loads the separate revision batches into separate directories within the repository, but I'm not sure how/if I can then recombine them into a single folder.
I'm also aware that I could use the --incremental switch when creating the dumps, but I'm not sure if that's a good idea since I suspect there may be some corruption in the incremental data (one reason I suspect that is because running svnsync
or git svn clone
on the repository sometimes errors out with a checksum mismatch)
Can I combine the non-incremental sequential dumps I have into a unified new repository somehow? If not, what other method should I use to do this considering svnsync
and svnrdump
have never succeeded when run against all revisions at once?