SVN: Migrating a Repository
2 min read • 271 words	
	#svn #archive
I use Subversion (SVN) as my version control software for all of my Android development. Although a powerful tool, it is not always obvious how to achieve the goal I want. Here are some Tasks I have needed complete using SVN, and how I went about doing so.
NOTE: For all of the following instructions, assume we are working in the user's home directory.
Moving repo A to a server
- Dump the repo A - svnadmin dump A a.dmp
- Copy the dump to the server. - scp a.dmp username@ssh.server:path:to:file
In my example, I use scp, however you can use FTP, or any other means of getting the a.dmp file to the server.
- Connect to the server - ssh username@ssh.server- You will likely be prompted for your password. 
- Create the new repository on the server. - svnadmin create NewRepo
- Load a.dmp into the new repo. - svnadmin load NewRepo < a
What if you want to create a new repo, that acts as a parent for your already existing repos?
Moving repo A, and repo B into a new parent repo C
- Create the new repositorysvnadmin create C
- Create A and B directories within the newly created repositorysvn mkdir file:///path/to/home/dir/A -m "Adding A directory" svn mkdir file:///path/to/home/dir/B -m "Adding B directory"
- Create dumps of repo A, and repo Bsvnadmin dump A a.dmp" svnadmin dump B b.dmp
- Load these dumps into the subdirectories of repo Csvnadmin load C/ -parent-dir A < a.dmp svnadmin load C/ -parent-dir B < b.dmp