# BKP_SHA_MISMATCH: Backup failed the integrity check

- Module: BKP. Backup service (Enterprise backups and their copy to the backup datacentre)
- Severity: Critical
- Impact: Customers. End customers are affected (e.g. a missing e-mail, payment or order).
- Retry: Not retryable. Retrying will not help until the cause is fixed.
- Reference: https://docs.bizkithub.com/en/system-codes/BKP_SHA_MISMATCH

## What happened

While copying a backup to the backup datacentre the platform computed the SHA-256 of the stored file. It differs from the checksum the client sent when it finished the upload, so the stored file is not the file the client hashed.

## Likely causes

- The file changed on the source server while it was being uploaded (for example a dump still being written).
- The client computed the checksum of a different file than it uploaded.
- Data was damaged on the way to storage.

## How to resolve

1. Run the backup again from a finished, unchanging file.
2. Make sure the checksum is computed from exactly the uploaded file (bkh-backup does this automatically).

## Related codes

- BKP_UPLOAD_FAIL: Backup was not completed
- BKP_MIRROR_FAIL: Backup could not be copied to the backup datacentre
- BKP_MIRROR_SLA: Backup copy to the second datacentre is late
- BKP_REVERIFY_BAD: Stored backup failed periodic re-verification
- BKP_EXPECT_MISS: Expected backup did not arrive
- BKP_SIZE_JUMP: Backup size changed by more than 20 %
