Linux – How to import/export repository from SVN to new SVN


I have an old Subversion on one server and another new one on another server.

I would like to export the head revision from the old repository and import it into the new one.

I have tried the below which seems to export, but I can't get it to import into the new one.

svn export --depth immediates file:///repositories/repo1/ /home/me/repo-export

This is what I am trying for import:

svn import /home/me/repo-export/ /svnroot/

How can this be done via the Linux (Red Hat Linux 4) command line?

Best Solution

It is possible to migrate only the most recent version without the history. However, I strongly recommend to migrate everything. The migration is explained in detail in the online book Version Control with Subversion:

In short:

  • Use svnadmin dump /path/to/old/repo or svnrdump dump old-url to create a dump of the old repository.
  • Use svnadmin load /path/to/new/repo or svnrdump load new-url to load the dump into the new repository.