Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to delete the historical version of svn

Shulou Source: shulou.com Published: 2022-06-01 05:05:18 10月01日 Update

Editor to share with you how to delete the historical version of svn, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

When the svn library is large to a certain extent, it will certainly bring us a lot of inconvenience in terms of query and backup. Here are some ways to reduce the size of the svn library.

To put it simply, create a new library, and then move the data in a version range that we need to query in the old library, as follows:

Steps:

1. Preparatory work

Stop running Apache.

Open a command line prompt

Enter the command:

Svnlook youngest d:\ SVNRepository, check the current latest version number and show that the latest version is recorded as 755.

2. Back up the version library (it is important to avoid accidental data loss or damage to the version library)

Back up the version library of disk D to disk C, and clear the history log.

Enter the command: svnadmin hotcopy-- clean-logs d:\ SVNRepository c:\ SVNRepository

In this way, the version library has changed from 3.34G to 3.24G after backup. (here you can choose whether to clear the history log)

3. The version of dump that needs to be retained

I initially chose to keep the 700-755 version.

Enter: svnadmin dump c:\ SVNRepository-r 745 repo_dump_745_755.dmp 755 > d:\

4. Delete the version library (this step is optional, and it doesn't matter if you don't delete it)

Enter the command: rmdir / SQL QD:\ SVNRepository to delete the old version library. It can also be deleted directly in Explorer.

5. Create an empty version library

Enter the command: svnadmin create d:/SVNRepository, check that the empty version library is about 31.2k in size.

6. Import the dump file into the version library

Enter the command: svnadmin load d:\ SVNRepository < d:\ repo_dump_745_755.dmp

The text that is being loaded in the version library will be displayed on the screen.

Or the version being submitted / loaded. When finished, use the

Command

Svnlook youngest d:\ SVNRepository view shows that the latest version number of the current version library is 11, and the entire version library size is 501m.

The above is all the contents of the article "how to delete the historical version of svn". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Version command input history backup article selection content size file log in progress query important inconvenient unexpected not much method at the same time most Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Technology vpn Shulou Tech Info Linux