CLUSTER SAVECONFIG
CLUSTER SAVECONFIG
- Group
- Cluster
- Complexity
- O(N) where N is the number of known nodes
- Arity
- 2 (exactly, counting the command name)
- HotKV Cloud
- Not available
- On-Premise
- no license needed
CLUSTER SAVECONFIG writes the node’s view of the cluster (nodes, slots,
epochs) to its cluster configuration file, cluster-config-file
(nodes.conf by default), before it replies. The node already
saves the file whenever its configuration changes; use this command to make
sure, for example before a backup, or to check that the file can be written.
Return value
Section titled “Return value”Simple string OK in RESP2 and RESP3, or one of these errors:
| Case | Error |
|---|---|
| The file could not be written | ERR error saving the cluster node config: <reason> |
| Cluster mode is off | ERR This instance has cluster support disabled |
Examples
Section titled “Examples”127.0.0.1:6379> CLUSTER SAVECONFIGOKCompatibility
Section titled “Compatibility”Same as Redis 7 and Valkey 8.
See also
Section titled “See also”CLUSTER NODES, Persistence and backups
In a cluster: Cluster troubleshooting
Was this page helpful?
Thanks for the feedback.