Skip to main content

AhsayOBM Data Integrity Check on Linux (CLI)

Article ID
5001
Last Reviewed Date
Product Version
AhsayOBM: 7.3 or above
Operating System
Linux / FreeBSD
Description

This Know-How article outlines the steps to perform a Data Integrity Check on a Linux / FreeBSD machine with Command Line Interface (CLI) for backup data stored in the backup destination (e.g. local destination, AhsayCBS or other cloud storage).

The functions of the Data Integrity Check (DIC) is to:

  1. Identify and remove the files and/or folders in the backup destination(s) which do not appear in the index.
  2. Identify and remove the files and/or folders which appear in the index but do not actually exist in the backup destination(s).
  3. Identify and remove corrupted files from the backup destination(s) when the Run Cyclic Redundancy Check (CRC) During Data Integrity Check setting is enabled.
  4. Identify and remove partially uploaded (orphan) files from the backup destination(s) to free up storage space.
  5. Identify and rebuild malfunctioned file index.
  6. Update the storage statistics from the backup set(s).
The Data Integrity Check cannot fix or repair files that are already corrupted. It will only identify and remove any corrupted files from the backup destination(s), so these files can be re-uploaded again on the next backup job if they still exist on the backup source. However, any corrupted files removed from the Retention Area will not be re-uploaded and will no longer be restorable.
Solution

Data integrity check can be performed by running the RunDataIntegrityCheck.sh script file located in the installation bin folder.

By default, the Data Integrity script will:

  • Perform check for all backup sets
  • Perform check for all storage destinations
  • Perform check with Cyclic Redundancy Check (CRC) disabled

Assumption

AhsayOBM is installed in the path /usr/local/obm

  1. Login to the Linux machine using root account.
  2. Edit the RunDataIntegrityCheck.sh script with a text editor.

    CLI Text Editor

    Modify the settings in the file according to your requirement.

    Run Data Integrity Check script

  3. Start the data integrity check by running the RunDataIntegrityCheck.sh script file.

    The following output is an example of an integrity check performed for a file backup set on AhsayCBS storage destination.

    (In case a warning message is displayed, it can be safely ignored since the data integrity check is not affected by the warning.)

    Run Data Integrity Check result

  4. Integrity check logs can be found in the path /root/.obm/system/IntegrityCheck.

    Data Integrity Check Logs

  1. A data integrity check can only be performed when there is no manual / scheduled backup job in progress (of the corresponding backup set). It is highly recommended to temporarily disable the backup schedule to ensure that no scheduled backup is started while the data integrity check is still running.

    The following error message will be displayed to indicate that the data integrity check had skipped a backup set with active backup job


    Skipped Backup Set="Backup Set". Reason = "Backup Job "Backup Set" is still running."
    Finished data integrity check with error on backup set "Backup Set (Backup Set ID)


  2. The time required to complete a Data Integrity Check depends on a number of factors, such as the number of files/folders in the backup set(s), the bandwidth available on the client computer, hardware specifications of the client computer such as the disk I/O and CPU performance, and if there are other resource-intensive job running.
  3. If the CRC (Cycle Redundancy Check) option is enabled, backup data will be streamed from the backup destination (e.g. the cloud storage location or FTP location for example), to the client computer in order to perform the CRC check. This may incur additional charges from your Cloud Storage provider. For users with a metered internet connection, this could result in additional charges by your ISP (Internet Service Provider).
  4. During a data integrity check, pay attention to the resource usage on the client computer.
  5. Consule with your cloud service provider to ensure that CRC checks are performed regularly for your data.
  6. For backup destinations on cloud storage services, such as Amazon S3, data integrity checks are expected to be performed by the cloud storage service provider.

According to Amazon S3 FAQs (https://aws.amazon.com/s3/faqs):

How is Amazon S3 designed to achieve 99.999999999% durability?
Amazon S3 redundantly stores your objects on multiple devices across multiple facilities in an Amazon S3 Region. The service is designed to sustain concurrent device failures by quickly detecting and repairing any lost redundancy. When processing a request to store data, the service will redundantly store your object across multiple facilities before returning SUCCESS. Amazon S3 also regularly verifies the integrity of your data using checksums.
What checksums does Amazon S3 employ to detect data corruption?
Amazon S3 uses a combination of Content-MD5 checksums and cyclic redundancy checks (CRCs) to detect data corruption. Amazon S3 performs these checksums on data at rest and repairs any corruption using redundant data. In addition, the service calculates checksums on all network traffic to detect corruption of data packets when storing or retrieving data.