3

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?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Yonkee
  • 1,781
  • 3
  • 31
  • 56
  • you mention you want to 'export the head'... are you uninterested in preserving the history of the repository? – thekbb May 23 '13 at 03:05
  • Duplicate of http://stackoverflow.com/questions/49450/how-do-i-export-and-then-import-a-subversion-repo ? – kristianp Oct 01 '15 at 01:09

1 Answers1

5

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.
nosid
  • 48,932
  • 13
  • 112
  • 139