Reputation: 14355
Im using redis 2.8.3 server to store key value pairs in redis.
redis.conf
port 6378
bind 127.0.0.1
databases 16
After restarting the redis-server
redis-server /home/redis.conf
Im loosing all the keys which i have already stored in redis.Can anyone help me to solve this.
Upvotes: 7
Views: 12971
Reputation: 5031
to prevent removing data from redis after restarting redis service in windows
, you should update redis.windows-service.conf
.
Redis SAVE
command is used to create backup of current redis database
Save the DB on disk: save
seconds
changes
Will save the DB if both the given number of seconds and the given number of write operations against the DB occurred
In the example below the behaviour will be to save:
like in the following example, in SNAPSHOTTING
section:
################################ SNAPSHOTTING ################################
save 1 1
save 100 50
after making changes, restart redis service
,
you can download last version of redis for windows
Upvotes: 0
Reputation: 31
Use this configuration settings, which will help you to sync data using a background process:
# appendfsync always
appendfsync everysec
# appendfsync no
Upvotes: 0
Reputation: 2611
If you run a 'BGSAVE' before you shut down the server does that help?
The shutdown script should always run that....
Upvotes: 6