Skip to main content
Loading

Backing Up Indexes with ASMT

You can use the Aerospike Shared-Memory Tool (AMST) to back up indexes that are stored in shared memory, which is a feature of Aerospike Database Enterprise Edition (EE).

Backup Procedure

Prerequisites

  • Ensure that the asmt executable has write permission to the backup directory.
  • Stop the Aerospike daemon process (asd) after quiescing it. asmt will fail if the node is still running.
  • Ensure that the backup directory does not include files created by a previous backup operation, as asmt does not overwrite existing files. asmt will not start if the directory has a mix of blocks with different shared-memory keys.

(Optional) Pre-run check

You can run asmt with the -a option to check whether the indexes can be backed up, without actually executing the back-up operation.

sudo ./asmt -a -b

You must use the sudo command, so that asmt can run with uid and gid both set to 0.

OptionDescription
-aAnalyze whether the indexes can be backed up, but stop the action from actually happening
-bdesignates a back-up operation

Back up the indexes

sudo ./asmt -b -v -p <path-to-backup-directory>
  • -p Specifies the path in which to persist the indexes

See Options for ASMT for more.

ASMT backs up the indexes from shared memory to the file system. The length of time to execute the operation depends on the size of the indexes. The backup directory contains files with a .dat extension, persisting the shared-memory blocks, with the file names corresponding to shared-memory keys. Compressed backup files have a .dat.gz extension. The base file for a namespace is never compressed, because ASMT must examine its contents prior to restoring the indexes.

What to do next

You can now reboot the server that hosts your Aerospike cluster node. After the server is rebooted, and before you restart the Aerospike node, you can run ASMT to restore the indexes. With the indexes in shared memory, the node can perform a warm start.