From 8eff339ca43c403615a7821be054221274cb113f Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 4 Sep 2013 10:32:09 +0200 Subject: [PATCH] Cluster: CLUSTER SAVECONFIG command added. --- src/cluster.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cluster.c b/src/cluster.c index d5fbc5e7..694c4925 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -2314,6 +2314,14 @@ void clusterCommand(redisClient *c) { (unsigned long)sdslen(info))); addReplySds(c,info); addReply(c,shared.crlf); + } else if (!strcasecmp(c->argv[1]->ptr,"saveconfig") && c->argc == 2) { + int retval = clusterSaveConfig(); + + if (retval == 0) + addReply(c,shared.ok); + else + addReplyErrorFormat(c,"error saving the cluster node config: %s", + strerror(errno)); } else if (!strcasecmp(c->argv[1]->ptr,"keyslot") && c->argc == 3) { /* CLUSTER KEYSLOT */ sds key = c->argv[2]->ptr;