Menu

SVN Import

Importing an existing SVN repository

There are a number of different ways to import an existing SVN repository onto SourceForge, each with its own pros and cons. A few of these methods are outlined on this page.

It is best to start with a new repository. If necessary, you can remove and create a new svn repository via Admin -> Tools

Also, it's always a good idea to read through the entire instructions before starting to get the full picture, and to make sure to have backups.

Repository import from URL

Pros: The simplest method
Cons: The repository needs to be accessible online in svn format already, and is often the slowest import method

This is accomplished via Admin -> Tools, under where the svn repository is listed, select Import Repository and enter the full URL of where the repository is found online and it will start the import. You will receive an email when this is complete. Also note, we only allow importing over an empty repository (this is to prevent accidental data loss).

svnsync via local repository

Pros: Can be done remotely. With a little work, able to resume in case of errors.
Cons: Slower than direct load and svnrdump. Have to work from a svn repo instead of a repository dump

Note: It is also highly recommended to set up SSH Keys to handle authentication for this.

  1. Get your existing repo from somewhere (see [rsync Backups] to get it from SourceForge if needed)
  2. Create a local repository and import into that first:
    $ svnadmin create svnrepo
    $ svnadmin load svnrepo/ < svn_dump
  3. Print UUID of imported repository, which will be needed in step 6.
    $ svnlook uuid svnrepo/
  4. Initialize and sync from the local repository:
    $ svnsync init svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code file:///path/to/local/svnrepo/
    $ svnsync sync svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
  5. If the sync is interrupted for any reason, delete the sync lock (if necessary) and continue.
    $ svn propdel --revprop svn:sync-lock -r0 svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
    $ svnsync sync svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
  6. Once finished, go to Admin -> Tools then under where the repo is listed, select "Refresh Repository" to scan in the repo contents into the Allura system.
  7. To prevent accidental future svnsyncs, remove the following revprops:
    $ svn propdel --revprop -r0 svn:sync-from-url svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
    $ svn propdel --revprop -r0 svn:sync-from-uuid svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
    $ svn propdel --revprop -r0 svn:sync-last-merged-rev svn+ssh://ctsai@svn.code.sf.net/p/strawhat/code
  8. Optional - contact SourceForge support and ask them to run svnadmin setuuid your-repo <UUID obtained in step 3> and check the post-commit hooks

Contacting us

Pros: More options available
Cons: Slower turnaround, relying on SourceForge Staff to assist you. Must provide your full SVN dump to us, which may be a large file to transmit.

We can use svnadminor svnrdump to load a repository for you. Open a support ticket for assistance.


Related

Documentation: rsync Backups

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.