Skip to content
This repository
Browse code

ability to specify a different file name for the DB

  • Loading branch information...
commit b8b553c84fd1d9200fc35a08b9ea42ec9dbc73ee 1 parent 85dd2f3
Salvatore Sanfilippo authored

Showing 4 changed files with 11 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 0  Changelog
  2. +0 1  TODO
  3. +2 0  redis.c
  4. +6 1 redis.conf
3  Changelog
... ... @@ -1,3 +1,6 @@
  1 +2009-04-27 log file parsing code improved a bit
  2 +2009-04-27 bgsave_in_progress field in INFO output
  3 +2009-04-27 INCRBY/DECRBY now support 64bit increments, with tests
1 4 2009-04-23 RANDOMKEY regression test added
2 5 2009-04-23 dictGetRandomKey bug fixed, RANDOMKEY will not block the server anymore
3 6 2009-04-22 FLUSHALL/FLUSHDB no longer sync on disk. Just increment the dirty counter by the number of elements removed, that will probably trigger a background saving operation
1  TODO
@@ -7,7 +7,6 @@ BEFORE REDIS 1.0.0-rc1
7 7 - network layer stresser in test in demo, make sure to set/get random streams of data and check that what we read back is byte-by-byte the same.
8 8 - maxclients directive
9 9 - check 'server.dirty' everywere
10   -- config parameter to change the name of the DB file
11 10 - replication automated tests
12 11 - an external tool able to perform the 'difference' between two Redis servers. It's like 'diff', but against Redis servers, and the output is the set of commands needed to turn the first server into the second, suitable to be sent via netcat.
13 12 $ ./redis-diff 192.168.1.1 192.168.1.2 > diff.txt
2  redis.c
@@ -1001,6 +1001,8 @@ static void loadServerConfig(char *filename) {
1001 1001 server.requirepass = zstrdup(argv[1]);
1002 1002 } else if (!strcmp(argv[0],"pidfile") && argc == 2) {
1003 1003 server.pidfile = zstrdup(argv[1]);
  1004 + } else if (!strcmp(argv[0],"dbfilename") && argc == 2) {
  1005 + server.dbfilename = zstrdup(argv[1]);
1004 1006 } else {
1005 1007 err = "Bad directive or wrong number of arguments"; goto loaderr;
1006 1008 }
7 redis.conf
@@ -34,6 +34,9 @@ save 900 1
34 34 save 300 10
35 35 save 60 10000
36 36
  37 +# The filename where to dump the DB
  38 +dbfilename dump.rdb
  39 +
37 40 # For default save/load DB in/from the working directory
38 41 # Note that you must specify a directory not a file name.
39 42 dir ./
@@ -50,7 +53,9 @@ loglevel debug
50 53 # output for logging but daemonize, logs will be sent to /dev/null
51 54 logfile stdout
52 55
53   -# Set the number of databases.
  56 +# Set the number of databases. The default database is DB 0, you can select
  57 +# a different one on a per-connection basis using SELECT <dbid> where
  58 +# dbid is a number between 0 and 'databases'-1
54 59 databases 16
55 60
56 61 ################################# REPLICATION #################################

0 comments on commit b8b553c

Please sign in to comment.
Something went wrong with that request. Please try again.