Skip to content

Migrate into Redis

Tested with: Redis (compat) 7.2 on Databasezy · zb CLI 0.1

Sources: Redis Cloud, Upstash, any reachable Redis or Valkey server, Docker containers, .rdb snapshots, another Databasezy instance.

Keys are copied one by one: SCAN on the source, DUMP + PTTL per key, RESTORE ... REPLACE on the target, so values keep their encoding and TTL. An uploaded .rdb file is loaded into a throw-away local server inside the migration Job and copied the same way. redis-cli --rdb / replica sync is not used: most managed Redis services block SYNC/PSYNC.

Moving to Valkey instead is the Redis to Valkey conversion; see engine conversions.

shell
# --dry-run prints the preflight checklist and the exact plan without changing anything
zb migrate --from "rediss://default:[email protected]:12345" --engine redis --to inst_abc
zb migrate --from ./dump.rdb --engine redis --to inst_abc
zb migrate --from local --engine redis --to inst_abc # redis-cli --rdb on your machine

Follow it with zb migrate status <mig_id>, or in the portal under the instance’s Migrate in tab.

Key count (DBSIZE) on both sides. Mismatches are listed in the result; nothing is switched for you.

  • Only the logical database in the URL is copied (/0 by default); run one migration per database.
  • Keys written to the source during the copy may be missed; there is no sync. Plan a short write freeze.
  • Module-typed keys (RedisJSON, RediSearch) restore only if the target runs the same modules.

How migrations work covers preflight, verification and cutover; engine conversions covers moves between engines.