Before you start: migrate from Aiven to KiviDB
You need valkey-cli (or redis-cli 6.2 or later, built with TLS) and the Aiven CLI, avn:
Install the tools
You need valkey-cli (or redis-cli 6.2 or later, built with TLS) and the
Aiven CLI, avn:
pip install aiven-client
avn user login you@example.com
avn service list --project my-project
Get the service's connection details
avn service get my-valkey --project my-project --format '{service_uri}'
This prints the service URI, rediss:// followed by the username, the password,
the host and the port. Aiven gives each service its own port, so take it from
the URI rather than assuming 6379. The console shows the same URI on the
service's Overview page.
export AIVEN_URI='rediss://default:...@my-valkey-my-project.e.aivencloud.com:12691'
valkey-cli -u "$AIVEN_URI" PING
Aiven for Valkey uses a Let's Encrypt certificate by default, which clients
trust without configuration. Services created before Aiven switched to it still
use the project's own CA: if the service's Overview page offers a CA
Certificate to download, yours is one of them. Download it as ca.pem, and
add --cacert ca.pem to the valkey-cli commands in this guide and
--source-cacert ca.pem to the RIOT commands.
Let the copy machine in
The copy runs from a machine you control: a VM near the Aiven service's cloud
region, so the copy is fast. If the service's allowed IP addresses
(ip_filter) are restricted, add that machine's address in the console, under
the service's network settings, before you start. KiviDB Cloud must also allow
it: Configuration → Network → Allowed IPs.
Check what the service uses
valkey-cli -u "$AIVEN_URI" INFO server | grep -E 'valkey_version|redis_version'
valkey-cli -u "$AIVEN_URI" INFO keyspace
valkey-cli -u "$AIVEN_URI" INFO memory | grep -E 'used_memory_human|maxmemory_human|maxmemory_policy'
valkey-cli -u "$AIVEN_URI" INFO commandstats | grep -E 'eval|evalsha|fcall|function'
avn service user-list my-valkey --project my-project
CONFIG GET is disabled on Aiven; read the settings with avn service get my-valkey --project my-project --json instead, under user_config.
| Check | Why it matters |
|---|---|
valkey_version 9.0 or later | Changes how you move the data (below) |
INFO keyspace lists db1, db2... | RedisShake copies every database; RIOT copies one per run |
| Cluster plan | Use cluster mode in the copy tool, and a cluster or sharded database as the target |
cmdstat_eval, cmdstat_evalsha, cmdstat_fcall | Lua is on by default on Aiven, and job queues (BullMQ, Sidekiq) and lock libraries use it. KiviDB needs the lua or full build; on Cloud, turn on Lua scripting when you create the database. Default and free-tier Cloud databases have no Lua |
maxmemory_policy | Set the same policy on KiviDB. Both default to noeviction |
| Service users | Recreate each user, with its key patterns, command rules and channels, on KiviDB |
| Search, JSON or other modules in your code | Search, JSON, time series and vectors are built into KiviDB; there is no MODULE LOAD |
Size it
Size KiviDB from used_memory_human, the data actually held, not from the
Aiven plan's RAM: Aiven gives Valkey about 70% of a node's memory (50% on the
free plan) and keeps the rest for itself. Leave headroom on KiviDB for growth
and for the copy itself; about 30% more than used_memory is a reasonable
start.
Pick the build
| Your Aiven service uses | Self-hosted build | KiviDB Cloud |
|---|---|---|
| Nothing below | default | default |
Lua (EVAL, FUNCTION) | lua | Lua scripting add-on |
| TLS (Aiven's default) | tls | TLS on (always available) |
| Both | full | Both add-ons |