简体   繁体   English

在SVN中优化SVNAdmin验证

[英]Optimize SVNAdmin Verify in SVN

I have a large repository into a SVN Server in the enterprise i work. 我在我工作的企业中有一个大型存储库到SVN服务器。 I need to verify the integrity of this repository everyday to check for some instability or rupture of the SGBD. 我需要每天验证此存储库的完整性,以检查SGBD的某些不稳定性或破裂。

I'm using the prompt command line "svnadmin path_to_my_repository" to verify the integrity of my repository. 我正在使用提示命令行“svnadmin path_to_my_repository”来验证我的存储库的完整性。

The problem is: how my repository is so large (about 23GB with 28.029 revisions), this operation takes a lot of time before finish. 问题是:我的存储库如此大(大约23GB,修订版为28.029),此操作需要很长时间才能完成。

The question is: How do i to optimize this operation to take less time than is taking actually? 问题是:如何优化此操作以减少实际采取的时间? Or have some other way that can i use to verify the integrity of my repository with less time? 或者使用其他方法可以用更少的时间来验证我的存储库的完整性?

Some extra information: 一些额外的信息:

  • The OS where the SVN Repository is installed is: Windows Server 2008 安装SVN存储库的操作系统是:Windows Server 2008
  • The SVN Server i'm using to store my repository is: VisualSVN Server Manager 2.5.7 我用来存储我的存储库的SVN服务器是:VisualSVN Server Manager 2.5.7
  • The command "svnadmin path_to_my_repository" actually is taking about 18~24 hours. 命令“svnadmin path_to_my_repository”实际上需要大约18~24小时。

The "svnadmin verify" command takes a few different arguments. “svnadmin verify”命令采用了一些不同的参数。 One of which is "--revision". 其中之一是“--revision”。 So what you should do for each repository that you have, figure out a way to get the list of revisions modified in the last N days (maybe last 7 days if this runs daily), and only verify those. 那么你应该为你拥有的每个存储库做些什么,找出一种方法来获取在过去N天内修改的修订列表(如果每天运行,可能是最后7天),并且只验证这些。

List of files changed since a certain date using SVN 使用SVN在特定日期之后更改的文件列表

You should still do a full "svnadmin verify" for the entire repository regularly (weekly? monthly?). 您还应该定期对整个存储库进行完整的“svnadmin验证”(每周一次?每月一次?)。 The frequency of the full check should be such that you can pull the broken revisions off of your backup set if you encounter issues. 如果遇到问题,完整检查的频率应该是您可以从备份集中提取损坏的修订版本。

Alternately, if you are using "svnadmin hotcopy" and pushing that hotcopy off to a 2nd set of spindles (or a second server), you could let the hotcopy be validated. 或者,如果您使用“svnadmin hotcopy”并将该hotcopy推送到第二组主轴(或第二个服务器),则可以验证hotcopy。 Which would remove load off of the primary disks. 这将删除主磁盘的负载。

As a fastest solution i have found was code a script that parallelize the call of the svn command (svnadmin path_to_my_repository). 作为一个最快的解决方案,我发现代码是一个并行调用svn命令(svnadmin path_to_my_repository)的脚本。 Then for each thread i called the command "verify" for a different repository in my SVNServer. 然后,对于每个线程,我在我的SVNServer中为不同的存储库调用了命令“verify”。 This isn't the solution that i'm looking for, but i reached some gain of performance with this. 这不是我正在寻找的解决方案,但我通过这个获得了一些性能提升。 If someone knows the solution to optimize this task only using the svnadmin commands, please tell to us. 如果有人知道仅使用svnadmin命令优化此任务的解决方案,请告诉我们。 Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM