Correct way to create a volume for the rdb file in falkordb (docker)
schwab opened this issue · comments
What is the correct way to map the rdb file in a falkordb docker container to a volume on the host? We need to be able to persist the rdb file across docker restarts, but currently mapping to /data (the way it worked in redis_graph, is not working. No file is written to the host's file system as expected.
The docker flag being used is:
-v /datadrive/falkordb_graph/:/data
I explored the docker file system and found the rdb file had been written to the /FalkorDB directory, but it doesn't start if you map the volume to the :/FalkorDB directory. I also trying using Config Set but that fails because there is no config file (which would need to also be stored in the host's volume to persists changes I believe.
Perhaps there is another way to persists things?
you can use this command
docker run -it -p 6379:6379 -v $(pwd):/data -e REDIS_ARGS="--dir /data --dbfilename dump.rdb" falkordb/falkordb:4.0.0-alpha.1
it will create a volume on the disk and the redis rdb file will be saved to it and it can be loaded from that volume
Yes it works great. Thanks for the quick response.