Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to migrate the SVN version Library

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to migrate the SVN version library". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Export the original SVN version library

Dunp mode can be divided into full export and incremental export.

Full export:

Compressed backup: [root@aliyun home] svnadmin dump / home/svn/repos1 | gzip >. / repos1.gz uncompressed backup: [root@aliyun home] svnadmin dump / home/svn/repos1 >. / repos1.svn

Incremental export:

[root@aliyun home] svnadmin dump / home/svn/repos1-r 0:50 > repos1 [root@aliyun home] svnadmin dump / home/svn/repos1-r 51 svnadmin dump 100-- incremental > repos2 [root@aliyun home] svnadmin dump / home/svn/repos1-r 101 svnadmin dump 150-incremental > repos3

Note that if it is an incremental export (the version has been imported in the new version library), you need to add the-incremental parameter.

Create a version library on the new server [root@svn home] svnadmin create / home/svn/reposnew copy the exported backup file to the new server and import the file

Compressed files cannot be imported directly and need to be decompressed (so if two servers can communicate on the intranet, there is no need to compress them at all)

[root@svn home] gzip-d repos1.gz [root@svn home] svnadmin load / home/svn/reposnew

You can import uncompressed files directly:

[root@svn home] svnadmin load / home/svn/reposnew

If the error occurs in a partial import, it is because the parameter-incremental is not added when exporting the file:

[root@svn home] svnadmin load / home/svn/reposnew 'reposnew/db',.

The import process may take a long time. After completion, set the account password and pass the local svn client browsing test.

The address on the local computer that migrates the SVN version library also needs to be changed, as shown below under windows:

Just change it to the new address in the pop-up box.

If the code is extracted directly from the SVN version library on the server, then you also need to modify the address. You can get the SVN address by looking at the directory information on the server:

[root@aliyun home] svn info / data/wwwroot/testPath: .Working Copy Root Path: / data/wwwroot/testURL: svn://192.168.31.8/cnyunwei/testRepository Root: svn://192.168.31.8/cnyunweiRevision: 335.

Modify the address through the svn switch command. The basic format is as follows:

[root@aliyun test] svn switch-- relocate svn://old_IPADDR/repos http://new_IPADDR/repos

For example, the directory above needs to be adjusted to:

[root@aliyun test] svn switch-- relocate svn://192.168.31.8/cnyunwei/test http://192.168.31.10/cnyunwei/test will change if you check the information again: [root@aliyun test] svn info / data/wwwroot/testPath: .working Copy Root Path: / data/wwwroot/testURL: svn://192.168.31.10/cnyunwei/testRepository Root: svn://192.168.31.10/cnyunwei. That's all for "how to migrate the SVN version Library". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report