Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 286
Yonkee Avatar asked Jan 31 '26 20:01

Yonkee


1 Answers

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:

  • http://svnbook.red-bean.com/en/1.7/svn.reposadmin.maint.html#svn.reposadmin.maint.migrate

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.
like image 168
nosid Avatar answered Feb 03 '26 11:02

nosid



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!