How to fix ERR checksum error in Redis

RedisINTERMEDIATEHIGHUpdated Dec 29, 2025· 151 views

Redis detects a checksum mismatch in DUMP payloads or corrupted RDB files, typically during DUMP/RESTORE operations or RDB loading. This happens when data is corrupted during transfer, stored on a bad disk sector, or incompatible with your Redis version. Verify file integrity and restore from backups to recover.

Quick fix

Fixes ERR checksum error

redis-cli INFO server | grep redis_version
  1. Verify Redis versions are compatible
  2. Check the RDB file integrity with redis-check-rdb
  3. Restore from a clean backup
  4. Use correct methods to transfer binary RDB files
redis — error
redis-cli INFO server | grep redis_version
ERR checksum error

What this error means

Redis uses a 64-bit CRC checksum to verify the integrity of serialized data and RDB database files. When Redis tries to deserialize a DUMP payload or load an RDB snapshot, it calculates the checksum and compares it to the stored value. If they don't match, Redis rejects the data as corrupted and throws this error. This error typically appears in two scenarios: when using the RESTORE command with corrupted or tampered serialized data (from the DUMP command), or when loading a main RDB snapshot file at startup if the file has been damaged. The checksum protects against silent data corruption caused by hardware failures, network transmission errors, or filesystem bugs. RDB files generated by Redis 2.6+ include checksums for integrity verification. If you're seeing this on startup, your RDB file is likely corrupted and needs to be replaced or repaired.

Typical symptoms

  • Redis command fails with "ERR checksum error" when running RESTORE
  • Redis fails to start with "RDB CRC error" or "checksum error" during database loading
  • DUMP payload is rejected when transferring data between Redis instances
  • RDB file created on one version cannot be restored to another version
  • Binary corruption visible in dump files (contains mostly zeros or garbage bytes)
  • Network transfer of RDB files results in checksum verification failure

Common causes

  1. RDB or DUMP file corrupted during disk writes due to power failure, filesystem bug, or hardware failure
  2. Binary data truncated or modified during file transfer (using incorrect shell utilities like head, tail, or tr)
  3. DUMP payload inadvertently passed through text processing that damaged binary data
  4. Incompatible RDB version between source and destination Redis instances
  5. redis-cli -x used incorrectly to pipe binary data, losing bytes or corrupting encoding
  6. Incorrect locale settings when transferring binary files across systems
  7. Network transmission error during download or streaming of RDB files

How to fix "ERR checksum error"

1Verify Redis versions are compatible

Check the Redis version on both the source and destination instances:

bash
redis-cli INFO server | grep redis_version

RDB files from newer Redis versions may not be compatible with older versions. Ensure both instances are running compatible Redis versions. If your destination is on an older version, upgrade it or obtain an RDB file created by that version.

2Check the RDB file integrity with redis-check-rdb

Use the redis-check-rdb utility to diagnose RDB file corruption:

bash
redis-check-rdb /path/to/dump.rdb

This tool verifies the RDB file structure and checksum. If it reports an error, the file is corrupted. The utility may suggest a recovery point or identify the exact byte offset where corruption occurred.

3Restore from a clean backup

If your RDB file is corrupted, restore from a previously verified backup:

bash
cp /backup/dump.rdb.backup /var/lib/redis/dump.rdb
chown redis:redis /var/lib/redis/dump.rdb
systemctl restart redis-server

Always keep multiple dated backups of your RDB files. Test backups periodically by loading them on a spare Redis instance to ensure they're valid before you need them.

4Use correct methods to transfer binary RDB files

When transferring RDB files between systems, preserve binary data integrity:

bash
# Correct: Use cat with redirection or scp for binary files
LC_ALL=C cat dump.rdb | redis-cli -h destination-host -x restore mykey 0 REPLACE

# Or use scp directly (preserves binary data)
scp /var/lib/redis/dump.rdb user@destination:/backup/

# Incorrect: Avoid head, tail, sed, awk on binary files
head -c 1000000 dump.rdb | redis-cli -x restore ...  # Unsafe

Set LC_ALL=C when piping binary data to avoid locale-based character transformations.

5Handle binary data correctly in DUMP/RESTORE operations

When working with the DUMP and RESTORE commands in client libraries, ensure binary safety:

Node.js (ioredis):

javascript
const data = await client.dump('sourceKey');
await client.restore('targetKey', 0, data, 'REPLACE');

Python (redis-py):

python
data = redis_client.dump('source_key')
redis_client.restore('target_key', 0, data, replace=True)

Go:
Use the raw bytes returned by the library, don't convert to string. Most Redis clients handle this automatically, but always verify binary payloads are kept as bytes, not strings.

6Disable checksum verification only as a last resort

If you absolutely must load a file with a checksum mismatch (not recommended), you can disable verification in redis.conf:

conf
rdbchecksum no

Add this to /etc/redis/redis.conf, then restart Redis. This will skip checksum validation on startup but is dangerous because it allows silent data corruption to pass undetected. Only use this if you have no backups and must recover partial data. Re-enable it after recovery.

Advanced notes

RDB Checksum Details: Redis uses a 64-bit CRC checksum at the end of RDB files (since version 2.6). Earlier versions did not include checksums, so corruption could go undetected. Replication and AOF: If you're using replication, the slave receives an RDB via network stream during sync. A checksum error during replication often indicates network corruption—enable SSL/TLS for replication traffic. AOF as fallback: If your RDB is corrupted but you have an Append Only File (AOF) enabled, Redis can rebuild the dataset from the AOF on startup (aof-use-rdb-preamble is set by default). Google Cloud Memorystore: Users have reported checksum errors when exporting RDB files from managed Redis services due to version mismatches. Always verify the source service's Redis version before importing.

Frequently asked questions

What does "ERR checksum error" mean?
Redis uses a 64-bit CRC checksum to verify the integrity of serialized data and RDB database files. When Redis tries to deserialize a DUMP payload or load an RDB snapshot, it calculates the checksum and compares it to the stored value. If they don't match, Redis rejects the data as corrupted and throws this error.
How do I fix "ERR checksum error"?
Redis detects a checksum mismatch in DUMP payloads or corrupted RDB files, typically during DUMP/RESTORE operations or RDB loading. This happens when data is corrupted during transfer, stored on a bad disk sector, or incompatible with your Redis version. Verify file integrity and restore from backups to recover.
What causes "ERR checksum error"?
RDB or DUMP file corrupted during disk writes due to power failure, filesystem bug, or hardware failure Binary data truncated or modified during file transfer (using incorrect shell utilities like head, tail, or tr) DUMP payload inadvertently passed through text processing that damaged binary data
Is the "ERR checksum error" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading