Load into KiviDB: migrate from Azure Cache for Redis to KiviDB
Load into KiviDB. Migrate to KiviDB: Move from Redis, Valkey, ElastiCache, Redis Cloud, Aiven, Aerospike, Hazelcast and more: getting the data out, loading it
Self-hosted KiviDB
One RDB file:
kividb --dir /var/lib/kividb --requirepass "$KIVIDB_PASSWORD" --preload-file rdb:/backups/kividb-move.rdb
--preload-file loads that file instead of what is in --dir; if it cannot be
read, KiviDB does not start. Leave the flag off on later restarts. A file with
time series or RedisBloom keys is refused as a whole: use Option 2.
Several files (a clustered cache). --preload-file takes one file, so load
each with RedisShake's rdb_reader into a running KiviDB:
[rdb_reader]
filepath = "/backups/kividb-move-1.rdb"
[redis_writer]
address = "kividb.internal:6380"
password = "..."
# cluster = true # when the target is a KiviDB cluster: any node's address
./redis-shake shake.toml # once per file, changing filepath; each run ends with "all done"
Over commands (Option 2): add the writer to the scan configuration:
[redis_writer]
address = "kividb.internal:6380"
password = "..."
[advanced]
rdb_restore_command_behavior = "rewrite" # a rerun overwrites keys already copied
./redis-shake shake.toml
Without ksn it stops after all done; with ksn it keeps running until you
stop it.
Time series (Enterprise, Azure Managed Redis) go across with RIOT:
curl -LO https://github.com/redis/riot/releases/download/v4.3.0/riot-standalone-4.3.0-linux-x86_64.zip
unzip riot-standalone-4.3.0-linux-x86_64.zip
riot-standalone-4.3.0-linux-x86_64/bin/riot replicate --struct --key-type TSDB-TYPE \
--source-tls --source-pass "$ACCESS_KEY" --target-pass "$KIVIDB_PASSWORD" \
rediss://my-cache.eastus.redis.azure.net:10000 redis://kividb.internal:6380
Add --source-cluster with the OSS cluster policy. Check each series' labels,
retention and rules afterwards with TS.INFO, and set them with TS.ALTER and
TS.CREATERULE.
KiviDB Cloud
A KiviDB Cloud database cannot replicate from another server, so data arrives
as a file or over normal commands. The endpoint, the username (kividbapp) and
the password are on the database's overview; see
Connect to your instance. Add the address of any
VM that runs a copy tool to the database's allowed IPs.
One RDB file. Under Snapshots → Import a snapshot, upload the (uncompressed) file. Create a database from it, or restore it into an existing one. KiviDB Cloud does not accept an Azure Blob Storage SAS link as a seed URL today, so upload the file rather than linking to it.
Several files, or a copy over commands. Use RedisShake (and RIOT for time series) as for self-hosted, with the Cloud database as the target:
[redis_writer]
address = "my-db.cloud.kividb.io:6380"
username = "kividbapp"
password = "..."
tls = true
For a sharded database, set
cluster = true and give my-db-s1.cloud.kividb.io:6380. A sharded database
cannot be created from an imported file, so this is how to fill one.
Search indexes
After the data is in, run each FT.CREATE again (list them first on the source
with FT._LIST and FT.INFO). KiviDB indexes the keys already there. Text
matching has no stemming or phonetic matching.