Migrating SVN repositories under Linux

Source: Internet
Author: User

Article Source:

Http://www.linuxidc.com/Linux/2013-05/84693p2.htm

Migrating SVN repositories

The recent server hard drive bad channel caused frequent automatic shutdown, so you need to migrate SVN to the new server.

Use the same method in the new service to build SVN, and then export the original SVN repository data, and then import into the new SVN repository.

1. Export operations on the old server:
$ svnadmin Dump the directory path of the original repos (/repository/directory) > Dumpfile.svndump

2. Import the dumpfile.svndump into the new repository directory on the new server.
$ svnadmin Load New repos directory path (/repository/directory) < Dumpfile.svndump

If the project warehouse is more, attach a batch export command, the import changes will be OK:

  1. #!/bin/bash
  2. CD /home/svn
  3. FileList=' ls '#符号 • Is not a single quote but is located on the left side of the keyboard exclamation mark
  4. For fname in $filelist
  5. Do
  6. Svnadmin dump $fname >/home/svndump/${fname}. Svndump
  7. #echo $fname
  8. #最好是root用户执行, or sudo.
  9. Done

Then the local project SVN checkout and update address needs to be changed, using the TortoiseSVN tool right-click to find the relocate menu, and the use of the command is as follows:

      1. #在项目目录查看下仓库地址
      2. $ SVN Info
      3. #回显中的URL项就是旧版地址oldpath
      4. #然后切换到新版地址newpath即可
      5. $ svn Switch--relocate http://oldpath http://newpath
      6. #查看信息确认下
      7. $ SVN Info

Migrating SVN repositories under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.