How to change storage type in Aerospike?


Hello guys, i’ve just added the new namespace in aerospike, but i’ve make a mistake, i choose storage engine memory but this is wrong, because the storage engine must be device ( in my case). is it safe to change the storage memory of existing namespace? or which way i can go to change that, without deleting namespace? P.S I have a pretty old version 3.7.4 Thank you!


How many nodes and what is the replication factor?

If the answer to both is at least 2 then you can change one node at a time, wait for migrations to complete between each restart.

If either answer is 1 then you will need to take a backup and restore the backup after restarting with the updated configuration.


so can i just add to this config let’s say

storage-engine device {
                file /opt/aerospike/data/delivery.dat
                filesize 1G
                data-in-memory true

then just restart nodes? is it safe to change storage-engine from memory to device? and i have a 3 node cluster with replication-factor 2


For added safety, you may want to take a backup before doing the rolling restart.

When you restart a node you will lose the copies that node had on memory. With replication factor 2, you will still have another copy. You will need to wait for migrations to complete so that there are two copies of all data again before restarting the next node.