How to backup / dump & Restore redis database?


$ redis-cli
127.0.0.1:6379> auth mypassword
127.0.0.1:6379> CONFIG GET dir
127.0.0.1:6379> SAVE
127.0.0.1:6379> quit

This ensures dump.rdb is completely up-to-date, and shows us where it is stored (/var/lib/redis/dump.rdb in this case). dump.rdb is also periodically written to disk automatically.

$ cd /var/lib/redis
$ cat dump.rdb

dump.rdb is your redis backup file

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x