AAU It Services

migrate

Repository migration

It is impossible to perform a true migration between two SVN repositories as users are not allowed full access to the IST Subversion server. It is, however, possible to perform shallow migrations with the export command. This only copies a single revision in the repository. It is also possible to synchronise between two SVN repositories using the independent svnsync command. Both approaches are described in this guide.

SvnX has no facilities for export or sync commands. These must be performed from a command line terminal. To open a terminal, open the Terminal application in your System Utilities folder. Navigate to your working copy before continuing. The examples in these guides have used a working copy in the folder Documents/svn/jlb in the user's home folder. As an example, navigating to this folder would be done with the command

  • cd ~/Documents/svn/jlb

Export a single revision

To export a working copy elsewhere invoke the command

  • svn export SOURCE DEST

where SOURCE is either a path to a local working copy, or a full URL to the repository on the server. DEST is the folder where you want the exported files to be put. If the folder does not exist, it will be created. Optionally, you can add -r REV right after export to copy a specific revision, replacing REV with the revision's number.

Synchronise all revisions

Invoke the command

  • svnsync init DEST_URL SRC_URL

where DEST_URL is the URL of the new repository and SRC_URL is the source repository URL.

You will be prompted for password first. Press enter here as the username was selected as your local computer username. You will then be prompted for username and you should enter the full username for the destination repository. If it is an IST repository the username is your full email. Password is the associated password for the account.

You will then be prompted in the same way for credentials for the source repository. Do the same here.

Once the command has finished, invoke the following command to initiate the synchronisation:

  • svnsync sync DEST_URL

where DEST_URL is the url of the destination repository again. You may be prompted for username and password again as with the above command. Type those  in. The transfer will begin.

If the transfer halts for some reason (no network connection etc.) you execute the sync command again and it will proceed.