How to configure existing data directory for aerospike server inside docker?
The VOLUME
instruction in Dockerfile
does not copy the contents of the host machine into the container. It only creates a mount point. The mount point can be used either by a directory inside the image or it can be used by the host machine running the container. Assuming you want your host machine's data directory to be used by the container, you should specify that in your docker run
command using the -v
option. It should be something like below
docker run -v "/path/to/local/data:/aerospike/data" myimage
Read more about the VOLUME
instruction from docker reference (esp the notes) and this stackoverflow discussion.
Should be without semicolon. Did you try that, or its a typo here?
aql> select * from test
If you want to move data from one cluster to another, use asbackup / asrestore tools provided by Aerospike. asbackup also allows you to grab a percentage of the total data - say 5% sample - as a "production sample" for dev purposes. Swapping storage mediums is not trivial and will not always work correctly depending on source and destination cluster sizes.