Skip to main content

KV_LOAD

Loads data from the filesystem at runtime.

  • The data is read from the persist::path set in the config file

ParamTypeMeaningRequired
namestringData set name, previously used in KV_SAVEY
info

This command is available even if persistence is disabled.


Response

ParamTypeMeaning
stunsigned intStatus
namestringDataset name, as used in the request
keysunsigned intNumber of keys loaded

Possible values for st:

  • LoadError
  • LoadComplete
  • CommandSyntax
  • ValueTypeInvalid

See response status for status values.


Example

Save data with KV_SAVE:

Save data
{
"KV_SAVE":
{
"name":"users"
}
}

If the data is deleted or the server is restarted it can be restored:

Load Request
{
"KV_LOAD":
{
"name":"dump1"
}
}

Load Response
{
"KV_LOAD_RSP":
{
"st": 141,
"name":"dump1",
"keys": 50
}
}