saving in redis-cli , why isn't it saving?

638 views
Skip to first unread message

S Ahmed

unread,
Apr 19, 2011, 5:34:00 PM4/19/11
to redi...@googlegroups.com
My redis.conf says:


dir /usr/local/var/db/redis/


I fired up redis-cli

and did both:

bgsave and save

When I look in the folder /usr/local/var/db/redis it is empty.

Will it not save if I havent' met the thresholds of either time or # of key changes?


I installed redis using: 

brew install redis


paulino huerta

unread,
Apr 19, 2011, 6:58:20 PM4/19/11
to redi...@googlegroups.com
Make sure you are using the correct configuration file
Try from the client:

redis> get config dir

also, you should always see the logfile

--Paulino

2011/4/19 S Ahmed <sahme...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.

S Ahmed

unread,
Apr 19, 2011, 9:35:19 PM4/19/11
to redi...@googlegroups.com
Ok your right it showed a different folder.

The thing is, I first installed redis using the instructions on redis.io, and today I installed it again using 'homebrew install redis'.

How can I un-install the manual install I did via the instructions on redis.io?

When I do:

which redis-server

it says:

/usr/local/bin

Homebrew installed it in:

/usr/local/Cellar/redis/2.2.2/bin


The file in /usr/local/bin/redis-server is symbolic linked to ../Cellar/redis/2.2.2/bin/redis-server


/usr/local/etc/redis.conf

says the dir is: 

/usr/local/var/db/redis/


In redis> doing a config get dir says:

/User/my_username/

and indeed the dump.rdb is there with a timestamp of today.


So it must be picking up a config file from somewhere else?  Or it isn't using it by default if I started redis-server w/o a config flag?

Pieter Noordhuis

unread,
Apr 20, 2011, 3:47:03 AM4/20/11
to redi...@googlegroups.com
When you start Redis from your console without passing additional
arguments, you see the following:
"Warning: no config file specified, using the default config. In order
to specify a config file use 'redis-server /path/to/redis.conf'"

You need to pass the path of the config file as first argument in
order to pick it up..

Cheers,
Pieter

Marc Gravell

unread,
May 1, 2013, 11:51:33 AM5/1/13
to redi...@googlegroups.com
Does your config file contain a "dbfilename" setting? for example:

dbfilename dump.rdb

?


On 1 May 2013 05:55, Nick Li <nickl...@gmail.com> wrote:
start redis with specified config file  I used this quick start
eg mine is the following

 sudo redis-server /etc/redis/6379.conf

do redis-cli

with save command

you will see dump.rdb in your log file directory

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.

To post to this group, send email to redi...@googlegroups.com.



--
Regards,

Marc
Reply all
Reply to author
Forward
0 new messages