Restore db in specific namespace (AER-3655)


How to import db in specifc namespace.

$ asrestore -h -p 3000 -d /home/aerospike/backup_10_23_2011

coudln’t find namespace option in documentation. suggesting to contact Aerospike Support.

where it will be imported if namespace is not specified

does it also import index definitions?


Are you wanting to rename the namespace in the backup? This function is on its way but not yet released.

In the meantime renaming a namespace in the files can be done with a sed replace. See the backup format

On a phone at the moment so I cannot test, but something like the following should work.

find . -type f -exec sed -ri "s/^([+]\s+)OLDNAME/\1NEWNAME/g" {} \;


I have db on my server with specific namespace x. Need to import data and index in namespace y on the other system. how to do it. does this mean to rename the namespace value in import file manually to import data in specific namespace?

I tried with same namespace name and run import. It looks data imported but index is not imported.


Currently yes, but this feature has been added to asrestore, but not yet released.

Correct, the secondary indexes are not backed up, this feature also has been added to asrestore but not yet released.

Stay tuned.



A JIRA ticket has been filed to follow up on this issue; it’s AER-3655 for your reference.

Please stay tuned for updates on our progress. We will update this forum topic once a new release is out that fixes the issue.





In the meantime, feel free to bookmark our Tools release notes web page here so you are always aware of the latest Tools enhancements, features and fixes.




This is now an option --namespace of asrestore.