Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

SAVE

Last updated
SAVE
Group
Server
Complexity
O(N) where N is the number of keys
Arity
1 (exactly, counting the command name)
Flags
admin
HotKV Cloud
All plans
On-Premise
no license needed

SAVE writes a point-in-time snapshot of every database to the snapshot file (dbfilename in dir) and replies when the file is complete. The connection that sent it waits for the whole write, so on a large data set prefer BGSAVE, which replies at once and saves in the background.

A successful SAVE updates LASTSAVE and resets rdb_changes_since_last_save in INFO persistence.

Case Reply (RESP2 and RESP3)
Snapshot written Simple string OK
A background save is running Error ERR Background save already in progress
The file could not be written Error ERR Saving the snapshot failed, check the server log
127.0.0.1:6379> SAVE
OK
127.0.0.1:6379> LASTSAVE
(integer) 1790000000

Same replies as Redis 7 for the success case. HotKV’s snapshot file format is its own (the default file name is dump.hkv); see persistence.

BGSAVE, LASTSAVE, BGREWRITEAOF, SHUTDOWN