KV_LOAD
Loads data from the filesystem at runtime.
- The data is read from the
persist::path
set in the config file
Param | Type | Meaning | Required |
---|---|---|---|
name | string | Data set name, previously used in KV_SAVE | Y |
info
This command is available even if persistence is disabled.
Response
Param | Type | Meaning |
---|---|---|
st | unsigned int | Status |
name | string | Dataset name, as used in the request |
keys | unsigned int | Number 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
}
}