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.
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.
Check the Redis version on both the source and destination instances:
redis-cli INFO server | grep redis_versionRDB 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.
Use the redis-check-rdb utility to diagnose RDB file corruption:
redis-check-rdb /path/to/dump.rdbThis 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.
If your RDB file is corrupted, restore from a previously verified backup:
cp /backup/dump.rdb.backup /var/lib/redis/dump.rdb
chown redis:redis /var/lib/redis/dump.rdb
systemctl restart redis-serverAlways 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.
When transferring RDB files between systems, preserve binary data integrity:
# 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 ... # UnsafeSet LC_ALL=C when piping binary data to avoid locale-based character transformations.
When working with the DUMP and RESTORE commands in client libraries, ensure binary safety:
Node.js (ioredis):
const data = await client.dump('sourceKey');
await client.restore('targetKey', 0, data, 'REPLACE');Python (redis-py):
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.
If you absolutely must load a file with a checksum mismatch (not recommended), you can disable verification in redis.conf:
rdbchecksum noAdd 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.
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.
ERR fsync error
How to fix "ERR fsync error" in Redis
CLUSTERDOWN The cluster is down
How to fix 'CLUSTERDOWN The cluster is down' in Redis
ERR Job for redis-server.service failed because a timeout was exceeded
Job for redis-server.service failed because a timeout was exceeded
ERR Unbalanced XREAD list of streams
How to fix "ERR Unbalanced XREAD list" in Redis
ERR syntax error
How to fix "ERR syntax error" in Redis