Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optimize SVNAdmin Verify in SVN

I have a large repository into a SVN Server in the enterprise i work. I need to verify the integrity of this repository everyday to check for some instability or rupture of the SGBD.

I'm using the prompt command line "svnadmin path_to_my_repository" to verify the integrity of 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.

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
  • The SVN Server i'm using to store my repository is: VisualSVN Server Manager 2.5.7
  • The command "svnadmin path_to_my_repository" actually is taking about 18~24 hours.
like image 820
kamusett Avatar asked Mar 21 '13 13:03

kamusett


2 Answers

The "svnadmin verify" command takes a few different arguments. One of which is "--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.

List of files changed since a certain date using SVN

You should still do a full "svnadmin verify" for the entire repository regularly (weekly? monthly?). 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. Which would remove load off of the primary disks.

like image 178
tgharold Avatar answered Oct 04 '22 02:10

tgharold


As a fastest solution i have found was code a script that parallelize the call of the svn command (svnadmin path_to_my_repository). Then for each thread i called the command "verify" for a different repository in my SVNServer. 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. Thanks.

like image 28
kamusett Avatar answered Oct 04 '22 03:10

kamusett