12

I'm trying to migrate an old repository (let's call it myOldRepo) to a new repository (myNewRepo).

I've got an svndump of the old repo, myOldRepo.dump. I've checked out my new repository, myNewRepo. Both are in the same directory. I'm trying to use the following command to load the old repo dump into the new repo:

svnadmin load ./myNewRepo < ./myOldRepo.svndump

This gives the following error:

svnadmin: Can't open file 'myNewRepo/format': No such file or directory

I've been using SVN for a long time, and I haven't seen a format file in any of my repositories. What is this format that is expected in myNewRepo?

I also tried creating an empty format file (touch format) in the myNewRepo directory. Then, when I do the svnadmin load command, I get the following:

svnadmin: Can't read file 'myNewRepo/format': End of file found

I've seen posts that are similar to this, but I haven't yet found a post that quite answers my question.

Community
  • 1
  • 1
solvingPuzzles
  • 8,541
  • 16
  • 69
  • 112

1 Answers1

30

You need to load the dump directly into the repository, not a subfolder. You have to specify the path to the repository, not the checked out working copy. Try this:

svnadmin create ./myNewRepo
svnadmin load ./myNewRepo < ./myOldRepo.svndump

This should do the trick..

RooiWillie
  • 2,198
  • 1
  • 30
  • 36
Peter Parker
  • 29,093
  • 5
  • 52
  • 80
  • I'm not using a locally-created repository. `myNewRepo` is hosted on assembla.com. What should I do to get the svndump into `myNewRepo`? – solvingPuzzles Aug 23 '12 at 22:54
  • Aha, it looks like assembla.com has an in the web GUI. More info: http://forum.assembla.com/forums/2/topics/2521-how-to-import-a-local-svn-repo – solvingPuzzles Aug 23 '12 at 22:57
  • @solvingPuzzles, you can download a dump of your repository via the command `svnrdump`, provided that you have a recent enough svn. Take precautions regarding space, as svn repo dumps are usually quite large. (They get much smaller if you import them to git, if you want that). – rbrito Aug 15 '15 at 09:12