# Migrating from self-hosted Redis to Upstash
## 1. Move the data
Export from self-hosted (RDB snapshot or MIGRATE/DUMP per key) and
import into Upstash. There is no live-replication intake: plan a
cutover window. Test the export/import on a scratch database first
and compare key counts.
## 2. Fix the connection layer
- TLS: Upstash requires it. Add TLS to every client config.
- Auth: replace your password with the Upstash console token.
- URLs: replace host/port with the Upstash endpoint and port.
- No CLUSTER: if your client runs in cluster mode, switch it to
standalone.
## 3. Audit command usage
- Blocking commands (BLPOP, BRPOP, blocking XREAD) work over the
native protocol but NOT over REST. If you are also moving to
serverless, rewrite consumers as pollers or keep them on RESP.
- Check the compatibility notes: Upstash tracks Redis protocol up
to 8.4 with its own SEARCH and VECTOR command families.
- WATCH/UNWATCH/DISCARD are not supported over REST transactions.
Use /multi-exec semantics or Lua.
## 4. Rethink persistence and eviction
Self-hosted Redis often runs with noeviction and RDB/AOF tuned by
hand. On Upstash, check the data-size limit of your tier and set an
eviction policy that matches: cache workloads want TTLs plus an
eviction policy, durable workloads want no silent eviction.
## 5. Cut over
Dual-write during the window if you can, then flip reads, then
stop the old writes. Verify key counts and spot-check values
before decommissioning.
## Verify
Key count matches, TTLs preserved, app tests pass against Upstash,
and the old instance shows zero traffic before you shut it down.