]> git.saurik.com Git - redis.git/commitdiff
make append only filename configurable
authorPieter Noordhuis <pcnoordhuis@gmail.com>
Fri, 7 May 2010 09:55:12 +0000 (11:55 +0200)
committerPieter Noordhuis <pcnoordhuis@gmail.com>
Fri, 7 May 2010 09:55:12 +0000 (11:55 +0200)
redis.c
redis.conf

diff --git a/redis.c b/redis.c
index 19f431cf97c9c90b9b1bd1c2772ac9122d1d5b08..7e27e0fbfdc665d1c0b42644a48cb5288fd4b05b 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -1886,6 +1886,9 @@ static void loadServerConfig(char *filename) {
             if ((server.appendonly = yesnotoi(argv[1])) == -1) {
                 err = "argument must be 'yes' or 'no'"; goto loaderr;
             }
             if ((server.appendonly = yesnotoi(argv[1])) == -1) {
                 err = "argument must be 'yes' or 'no'"; goto loaderr;
             }
+        } else if (!strcasecmp(argv[0],"appendfilename") && argc == 2) {
+            zfree(server.appendfilename);
+            server.appendfilename = zstrdup(argv[1]);
         } else if (!strcasecmp(argv[0],"appendfsync") && argc == 2) {
             if (!strcasecmp(argv[1],"no")) {
                 server.appendfsync = APPENDFSYNC_NO;
         } else if (!strcasecmp(argv[0],"appendfsync") && argc == 2) {
             if (!strcasecmp(argv[1],"no")) {
                 server.appendfsync = APPENDFSYNC_NO;
index c946a80e86d0fa21e75324b6dc2aa5519b35d990..4d3689ed00b5a0e3c6610ad0069ab945ab7c9b9f 100644 (file)
@@ -159,13 +159,14 @@ dir ./
 # Still if append only mode is enabled Redis will load the data from the
 # log file at startup ignoring the dump.rdb file.
 #
 # Still if append only mode is enabled Redis will load the data from the
 # log file at startup ignoring the dump.rdb file.
 #
-# The name of the append only file is "appendonly.aof"
-#
 # IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append
 # log file in background when it gets too big.
 
 appendonly no
 
 # IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append
 # log file in background when it gets too big.
 
 appendonly no
 
+# The name of the append only file (default: "appendonly.aof")
+# appendfilename appendonly.aof
+
 # The fsync() call tells the Operating System to actually write data on disk
 # instead to wait for more data in the output buffer. Some OS will really flush 
 # data on disk, some other OS will just try to do it ASAP.
 # The fsync() call tells the Operating System to actually write data on disk
 # instead to wait for more data in the output buffer. Some OS will really flush 
 # data on disk, some other OS will just try to do it ASAP.