[QUESTION] Docker - There's no dump.rdb in /var/lib/redis even after running redis-cli SAVE or BGSAVE

185 views
Skip to first unread message

Alya Gomaa

unread,
Apr 24, 2021, 2:15:11 AM4/24/21
to Redis DB
I'm running an ubuntu image in docker and i installed redis as a service
Here's how i start redis in the Dockerfile:

CMD redis-server --daemonize yes && /bin/bash

now whenever i make changes to the database and run

redis-cli SAVE or redis-cli BGSAVE

 i expect to find a dump.rdb file generated in /var/lib/redis but that doesn't happen

these two lines are from my redis.conf in docker:
dbfilename dump.rdb
dir /var/lib/redis

 I don't want to mount my local dump.rdb file to the docker container.
How do i get redis to generate dump.rdb in docker?
Reply all
Reply to author
Forward
0 new messages