# Error: RDB checksum mismatch: expected 0xAB12CD34 but got 0x5678EF90

- **ID:** `redis/rdb-checksum-mismatch-restore`
- **Domain:** redis
- **Category:** data_error
- **Error Code:** `ERR`
- **Verification:** ai_generated
- **Fix Rate:** 75%

## Root Cause

The RDB file on disk has been corrupted or modified after creation, causing its checksum to differ from the expected value.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 6.2.0 | active | — | — |
| 7.0.0 | active | — | — |
| 7.2.0 | active | — | — |

## Workarounds

1. **Use redis-check-rdb to validate and attempt repair: 'redis-check-rdb /var/lib/redis/dump.rdb' then if repair is needed 'redis-check-rdb --fix /var/lib/redis/dump.rdb'** (70% success)
   ```
   Use redis-check-rdb to validate and attempt repair: 'redis-check-rdb /var/lib/redis/dump.rdb' then if repair is needed 'redis-check-rdb --fix /var/lib/redis/dump.rdb'
   ```
2. **Restore from the latest valid RDB backup or promote a replica to primary if replication is configured** (85% success)
   ```
   Restore from the latest valid RDB backup or promote a replica to primary if replication is configured
   ```

## Dead Ends

- **Restarting Redis without fixing the RDB file** — Redis will reload the same corrupt RDB file and fail again with the same checksum error. (100% fail)
- **Deleting the RDB file and restarting** — This causes complete data loss unless a replica or backup is available. (95% fail)
- **Running redis-check-rdb with --fix on a heavily corrupted file** — The fix tool can only recover partially; if the checksum mismatch is severe, it may truncate the file and lose data. (60% fail)
