Upgrading
HotKV Cloud instances are upgraded for you. This page is for HotKV On-Premise: upgrading a single server, rolling an upgrade through replicas and clusters, and what carries over.
Before you upgrade
Section titled “Before you upgrade”-
Read the changelog for the new release.
-
Take a fresh snapshot and copy it somewhere safe:
Terminal window hotkv-cli -a "$PASSWORD" BGSAVEhotkv-cli -a "$PASSWORD" LASTSAVE # changes once the save is donesudo cp /var/lib/hotkv/dump.hkv /backup/dump.hkv.$(date +%Y%m%d) -
Copy your configuration (
/etc/hotkv/), your ACL file if you use one, and your license file. -
With encryption at rest, make sure you have the key file: a snapshot cannot be read without it.
Upgrade a single server
Section titled “Upgrade a single server”Your account team sends you a private download link for each release. Download the newer package from it, then install it over the old one:
# Debian / Ubuntusudo apt install ./hotkv-enterprise_*.debsudo systemctl start hotkv
# RHEL / Rocky / Fedorasudo dnf install ./hotkv-enterprise-*.rpm- Debian and Ubuntu: the package stops the service during the upgrade and does not start it again; start it yourself.
- RHEL family: the package restarts the service if it was running.
Stopping saves a snapshot first when save points are configured (and with the AOF on every write is already in it), and the new version loads the data at startup. The server is unavailable from the stop until the data is loaded, so plan a short window or use replicas (below).
What the package keeps:
/etc/hotkv/hotkv.confis a configuration file: your edits are kept.- Files the package does not own are not touched: your data in
/var/lib/hotkv, your license file, your ACL file, certificates and keys.
Then check the new version is running:
hotkv-cli INFO server | grep hotkv_versionhotkv-cli LICENSE.INFOFor containers, recreate the container from the new image with the same
/data volume and settings; see
Docker and Kubernetes.
Data files
Section titled “Data files”Keep the snapshot (dump.hkv) you took before the upgrade. Rolling back
to the previous release needs it, because the previous release may not read
data written by the new one.
Encrypted snapshots carry over as long as the same key is configured.
Your license
Section titled “Your license”Your license file stays in place and the new version reads it from the same
license-path. If you move to new hardware, ask your account team for an
updated license before you move. See
Quick start: On-Premise.
Rolling upgrades with replicas
Section titled “Rolling upgrades with replicas”With replicas, upgrade one node at a time so the data stays served:
- Upgrade each replica in turn. After each one, wait until it has caught
up with its primary (
master_link_status:upinINFO replicationon the replica, and equal offsets) before the next. - Promote an upgraded replica:
REPLICAOF NO ONE(orREPLICATION.FAILOVER) on it, then point clients and the other replicas at it. - Upgrade the old primary and bring it back as a replica of the new one
(
replicaof host portin its configuration, orREPLICAOF host port).
Rolling upgrades in a cluster
Section titled “Rolling upgrades in a cluster”In cluster mode, failover moves the primary role for you. Upgrading a cluster walks through it on a running cluster with a client writing, step by step:
- Upgrade the replicas of every shard, one node at a time, waiting for
CLUSTER INFOto reportcluster_state:okand the replica to be in sync before the next. - On an upgraded replica of each shard, run
CLUSTER FAILOVER. It takes over as primary, and the old primary becomes its replica. - Upgrade the former primaries, now replicas, one at a time.
A rolling upgrade runs two versions side by side for a while. Keep that time short and finish the upgrade on every node before you use new settings.
Next steps
Section titled “Next steps”- Install: packages, files and ports.
- Upgrading a cluster: the rolling procedure.
- Clustering: failover and the cluster bus.
- Persistence: snapshots and the AOF.
Was this page helpful?
Thanks for the feedback.