Applies to: VisualSVN Server 3.6 and later
Verification jobs can be used to perform scheduled verification of the repositories in background mode. They assist administrators in safeguarding their Subversion repositories and routinely monitoring the data integrity. This article describes how to create and manage repository verification jobs and how to interpret their results.
What is repository verification
Subversion repositories should not be corrupted even in case of an emergency power loss. However, corruptions may occur due to hardware and software errors. Repository verification is a tool for examining repositories from first to last revision and checking the integrity of their data.
Creating Verification Jobs
You can add a scheduled repository verification job using the corresponding wizard in the VisualSVN Server Manager console:
- Right-click the Jobs element in the VisualSVN Server Manager console.
- Click Create Verify Repository Job.
- Name the job and optionally provide a description for it. Click Next.
- Choose which repositories will be verified by the new job. Click Next.
- Choose time and days of the week when it should run. Click Next.
- Click Create.
Managing Verification Jobs
Every configured job, including repository verification jobs, is shown within the Jobs element in VisualSVN Server Manager. For each job you can see its name, type, status and the result of the last run. The repository verification jobs will have their type displayed as Verify repository.
The current state of the job is shown in the Status column. Possible values are the following:
- Ready. The job is in standby mode. It is active and ready to start.
- Running. The job is running right now.
- Disabled. The job is deactivated and will not run on its schedule.
The result of the last run is shown in the Last Run column. Possible values are the following:
- Success. The verification process has completed successfully. No errors or discrepancies were found in the repository data.
- Error. At least one error occurred during the verification process.
- Interrupted. The running job has been interrupted and did not complete.
The last run status of the job is also indicated by the overlay icon near its name. As an example, a warning overlay icon would be displayed if the job's last run was interrupted.
Additionally, the Last Run Details column contains brief information about the outcome of the job's last run.
To manage verification jobs, you can use the context menu commands, such as Run, End, or Disable. You can also manage them using the PowerShell cmdlets: Get-SvnJob, Start-SvnJob, Stop-SvnJob, Enable-SvnJob and Disable-SvnJob. For more information about the PowerShell cmdlets, read the article KB88: VisualSVN Server PowerShell Cmdlet Reference.
Analyzing Verification Jobs results with the Job History
VisualSVN Server 4.2 and later versions add a clean and structured way of viewing the background jobs history.
Click the Show History context menu option for an existing background job. The opened Job History window displays background jobs in chronological order. In this window, click the Show Details context menu option to open Job Runs Details where you can find more information about each job run.
The Job Runs Details is particularly useful for repository verification jobs as it makes it easier to identify a repository that did not pass the verification. A repository name is reflected in the Repository column. A job run result is indicated with an icon and specified with a short message in the Details column.
Analyzing Verification Jobs results with the Event Viewer
As an alternative to the built-in VisualSVN Server Job History feature, the Windows Event Viewer also allows administrators to analyze the jobs results. More specifically, the detailed information about results of verification jobs can be found in the Application and Services Logs | VisualSVN Server Background Jobs log.
If you have configured the repository verification jobs to run regularly and there are no errors or warnings in the Event Log, then your repositories should be fine. On the contrary, if there are errors or warnings, this may indicate an issue with one of your repositories or with the job configuration. In this case, please examine the event details for additional information on what went wrong.
Please note that some of the logged messages are specific to the repository verification jobs, whereas some of them apply to the background jobs in general.
The following messages are specific to the repository verification jobs:
Event ID | Description | Example |
6713 | Verification of the repository completed successfully. This message will be written for each successfully verified repository. |
Repository has been verified successfully. No errors found. Repository: Repo1 Elapsed time: 00:05:29 |
6714 | A generic error occurred while verifying the repository. |
The repository 'Repo1' did not pass the verification: Not enough memory is available to complete this operation. |
6715 | An error occurred while verifying the content of the specific revision in the repository. |
The repository 'Repo1' did not pass the content verification: Found malformed header '4bf664ed8' in revision file Corrupted revision: 1 |
List of the general messages for the background jobs:
Event ID | Description | Example |
6700 | The job has started. | Background job 'Job1' has started. |
6701 | The job completed successfully. |
Background job 'Job1' has completed successfully: Successfully verified 2 repositories. Total elapsed time: 00:25:06 |
6702 | The job failed. |
Background job 'Job1' has failed with the following error: Failed to verify 1 out of 2 repositories. Total elapsed time: 00:13:01 |
6718 | The job was interrupted. |
Background job 'Job1' was interrupted. Details: Interrupted due to the system shutdown. |
See also
KB157: Understanding background jobs scheduling
KB185: Understanding Background Job notifications