Getting started with Verify Backup Jobs

Applies to: VisualSVN Server 5.2 and later

Verify Backup Jobs are scheduled background jobs that allow you to automatically verify backups created by Backup Repository Jobs. The goal of verifying a backup is to check that the backup can be successfully read, is not corrupted and is restorable.

What does backup verification check?

When verifying a backup, the job does the following:

  • Сhecks that all the files necessary for restoring the backup are present.
  • Checks that the required backup files are readable.
  • Checks that the backup's data is not corrupted, based on checksum validation.

Successful verification confirms the integrity of the backup itself, meaning that you can use the backup to restore the repository to its original state. However, backup verification does not detect whether the repository in the backup has any issues with it, such as any corrupted revisions, if these issues had been present in the original repository prior to the backup.

Tip
To periodically check your repositories for any integrity issues, such as corrupted revisions, you can use automated Verify Repository Jobs.

Creating Verify Backup jobs

You can add a scheduled Verify Backup Job using the corresponding wizard in the VisualSVN Server Manager console:

  1. Right-click the Jobs element in the left-hand pane in the VisualSVN Server Manager console.
  2. Click New | Verify Backup Job.
  3. Name the job and optionally provide a description for it. Click Next.
  4. Choose any desired Backup Repository Jobs the backups made by which you would like to regularly verify. See Selecting backups to verify below for details. Click Next.
  5. Choose the time and days of the week when backup verification should run. Click Next.
  6. Click Create.
  7. Click Finish.

Selecting backups to verify

In a Verify Backup Job, you can select any Backup Repository Jobs for which you want to regularly verify the backups that they create.

Note that every time a Verify Backup Job runs, it does not verify all the backup files currently stored by the selected repository backup jobs. Instead, it verifies only their newest backups. In other words, it verifies the backups created by the most recent run of each selected backup job. Backups from earlier runs of the selected backup jobs get verified only if they are part of a backup chain (and thus are required for restoring a most recent backup).

To determine the backup files that it should verify, a Verify Backup Job does the following:

  1. The Verify Backup Job looks at its own settings, to determine which Backup Repository Jobs are selected for verification.
  2. For each of these Backup Repository Jobs jobs, it looks up which repositories the backup job is currently configured to back up.
  3. Based on the history of the backup job, it looks up the most recent backup that the job created for each of these repositories.
  4. Then it verifies these most recent backups that have been determined this way.
Note
A Verify Backup Job cannot verify one-time repository backups that are not related to any Backup Repository Job.

Scheduling of Verify Backup Jobs

The scheduling settings in a Verify Backup Job allow you to choose the days of the week and the time of day when you want this Verify Backup Job to automatically run.

Although Verify Backup Jobs are not affected by other kinds of background jobs (and in principle are able to run simultaneously with other background jobs), it is still generally recommended that you schedule Verify Backup Jobs so that they do not overlap in time with other scheduled background jobs, to reduce the simultaneous load on the server.

Backup decryption passwords and network access credentials

When verifying an encrypted backup or a backup saved to some network storage that requires access credentials (such as a backup saved to the Microsoft Azure cloud), the decryption password and the network access credentials are retrieved from the current settings of the backup job that created the backup. If the password/credentials obtained this way do not work for decrypting or accessing the backup, then this backup will fail its verification, and the reason for this will be indicated in the verification job's event log messages (the backup could not be decrypted or could not be accessed), as described in the following sections of this article.

Managing Verify Backup Jobs

Every configured job, including Verify Backup 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 job's last run. Verify Backup Jobs will have their type displayed as Verify backup.

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. All the backups that the last run was supposed to verify have successfully passed verification. No problems were found by the verification.
  • Error. At least one of the backups has not passed verification.
  • 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. For 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.

Tip
You can get additional information on each past run of a Verify Backup Job either by using the VisualSVN Server's Job History feature or by using the Event Viewer. See the related sections below for details.

Analyzing Verify Backup Job's results with Job History

VisualSVN Server Manager allows you to view the history of past runs for background jobs, including the details on each past run.

Click the Show History context menu option for an existing background job. The opened Job History window displays the past runs of this background job in chronological order. In this window, click the Show Details context menu option to open Job Run Details where you can find more information about each job run.

The Job Run Details window is quite useful for Verify Backup Jobs, as it makes it easier to identify the specific backup that did not pass the verification. The Repository column shows you which repository the processed backup contains. The result of each stage of the job's run is indicated with an icon and described with a short message in the Details column.

Analyzing Verify Backup Job's 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 job results. More specifically, the detailed information about the results of the past runs of your Verify Backup Jobs can be found in the Application and Services Logs | VisualSVN Server Background Jobs log.

If you have configured Verify Backup Jobs to run regularly and there are no errors or warnings in this Event Log, then the backups that the Verify Backup Jobs are set to check should be fine. On the contrary, if there are errors or warnings, this may indicate an issue with one of these backups or with the job configuration. In this case, please examine the event's details for additional information on what went wrong.

Please note that some of the logged messages are specific to the Verify Backup Jobs, whereas some of them apply to background jobs in general.

The following messages are specific to Verify Backup Jobs:

Event ID Description Example
6726 Verification of the backup completed successfully. This message will be written for each repository backup that has successfully passed verification. Repository backup has been verified successfully. No errors found.

Repository: My_Repository

Backup Job: My_backup_job

Backup Path: C:\Users\Public\Documents\VisualSVN Server\Backup\My_backup_job\My_Repository-2023-06-28-180000-full.vsvnbak

Elapsed time: 00:05:29
6727 Repository backup did not pass the verification. The log entry will also indicate the reason why the backup verification failed. Among the possible reasons are the following ones:
  • The backup is not a valid repository backup file.
  • The backup file could not be decrypted.
  • The backup file stored on the network could not be accessed.
Repository backup did not pass the verification:

'C:\Users\Public\Documents\VisualSVN Server\Backup\My_backup_job\My_Repository-2023-06-28-180000-full.vsvnbak' is not a valid VisualSVN Server repository backup file.

Repository: My_Repository

Backup Job: My_backup_job

Backup Path: C:\Users\Public\Documents\VisualSVN Server\Backup\My_backup_job\My_Repository-2023-06-28-180000-full.vsvnbak

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 repository backups.

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 repository backups.

Total elapsed time: 00:13:01
6718 The job was interrupted. Background job 'Job1' was interrupted.

Details: Interrupted due to the system shutdown.
Last Modified: