Expand description
Migration toolchain (export / import). See
migrate::run_export and migrate::run_import.
Migration toolchain: export / import.
Wire format = a RESP command stream of rebuild frames (SET / HSET /
RPUSH / SADD / ZADD / PEXPIREAT) — bidirectionally compatible with
redis-cli --pipe. Export walks SCAN cursors (per-key
point-in-time; SCAN-class consistency). Import pipelines 512
commands per batch with a fsynced progress file for --resume.
Every key’s frames start with DEL, so replay REBUILDS the key from
scratch — genuinely idempotent for every type (RPUSH would
otherwise append on re-import; the round-trip test caught exactly
that). No cross-batch atomicity to lose.
Structs§
- Import
Report - Import stats.
Functions§
- run_
export - Run
export— walk the keyspace (optionally underprefix) and write rebuild frames toout_path. Returns exported key count. - run_
import - Run
import— streamsrc(a RESP command file) into the server,PIPELINEcommands per batch. The progress file<src>.progressrecords the safely-applied byte offset after every batch (fsynced);resumestarts there. Idempotent replay.