|Version 7 (modified by moorman, 5 years ago)|
Importing Data into Subversion
SourceForge.net permits the import of data into a Subversion repository from a user-supplied Subversion dump file. This Subversion dump file can be compressed (via .gz, .bz2, .zip, but not tarred) or uncompressed. As the import process is largely automated on our side, it is imperative that these instructions be followed closely and in their entirety to ensure a successful import.
Creating a Subversion dump file
You can create a Subversion dump file in a variety of ways, such as dumping an existing Subversion repository, or using a repository conversion tool, such as cvs2svn.
If you have backed-up your subversion repository using rsync, you can use "svnadmin dump DIRECTORY >FILE" to create a dump file of that content. There are tools available that can filter the resulting dump file, allowing you to make changes before importing it (as described below).
It is a good idea to compress the resulting dump file, to save space. We support zip, bzip2, and gzip compression.
Using cvs2svn to create a Subversion dump file from CVS content
If you have an existing CVS repository that you would like to convert to Subversion, follow these instructions:
- Download and install a copy of cvs2svn. You can use your own server, or use an interactive shell to do the work.
- Get a copy of the RCS files for the CVS repository. For SourceForge.net-hosted CVS repositories, this can be done via rsync. For projects hosted elsewhere, you may need to contact the repository administrator for a copy of the files.
- Clean up any data in the copy of the CVS repository. Ensure that any data that shouldn't be imported isn't present in the RCS files. Newer versions of cvs2svn require that the CVSROOT module be present, so you may want to use svndumpfilter after creation of the dump file to remove that directory from the import. Data cannot be readily removed from a Subversion repository after being imported, unless you do another, filtered import in the future.
- Convert the repository to a Subversion dump file using cvs2svn:
- Go to the directory at the root of the CVS repository
- Run the command: "cvs2svn --dumpfile=svndump ."
- If the conversion generates an error message, follow the prompts that indicate what the problem is, and attempt to resolve them using one of the various options for cvs2svn (--trunk-only will drop all branches and tags, which will usually make the process painless if all you need is the trunk).
- Compress the resulting SVN dump file (svndump), if you so desire, using zip, gzip or bzip2 (but do not tar it).
- Follow the instructions for importing a Subversion dump file to finish the import.
Importing a Subversion dump file
- Backup your your current Subversion repository if it has content.
- Make sure that the name of the dump file only contains alphanumeric characters and a period (Example: svndump.gz is good, but projectname-svndump.gz is bad due to the dash).
- Upload the dump file using the same method for uploads as the File Release System.
- Login to the SourceForge.net website and access the Project Summary page for your project.
- Click on the Subversion menu option from the Admin dropdown menu.
- Click on the 'migrate' link on the 'Migration Instructions' section of the page.
- Select the filename of the archive from the 'Source file' list, noting that it must comply with the filename restrictions previously described.
- Check the 'Replace' check box in the same column, if you wish to replace the existing content with the new content to be added.
- Enter the value you want passed to the --parent-dir argument of the "svnadmin load" command into the 'Destination' field. For most users, this would be left blank. For those using the destination option, the directory you specify must already be an already-created, empty direcotry in the Subversion repository for this to work.
- Click on the 'Submit' button.
- The migration will be finished within 24 hours. It could be finished in as soon as an hour or two, depending on the size of your dump file and the number of projects queued for migration in front of yours. Returning to the page will display whether it completed, failed, or is still in the queue.
Initial draft finished 2009-01-21