Our subversion repository has been moved to a new host, and we have old applications that connect to that host. We CANNOT add an alias for the new server with the old name, how can we re-connect our checked out clients to the new repository?
You can migrate a repository using the svnadmin dump function. On the SVN server, type svnadmin dump /absolute/path/to/the/repo > /tmp/repo. svndump . This will export the entire repository to a text file in the system's temporary directory and name it "repo.
# Clone a repo with standard SVN directory layout (like git clone): git svn clone http://svn.example.com/project --stdlayout --prefix svn/ # Or, if the repo uses a non-standard directory layout: git svn clone http://svn.example.com/project -T tr -b branch -t tag --prefix svn/ # View all branches and tags you have ...
Example:
svn switch --relocate \
http://svn.example.com/path/to/repository/path/within/repository \
http://svnnew.example.com/new/repository/path/within/repository
One thing which is to remember, lets assume you checked out the project "path/within/repository" then you have to go to the root of your working copy, and execute the above command. it is NOT enough just to use the repository root (as in svn switch --relocate http://svn.example.com/path/to/repository/ http://svnnew.example.com/new/repository/), because that wouldn't work.
Look up the svn switch command. In particular, the --relocate
option is what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With