Skip to main content
Loading

Back up and restore AVS

Overview

This page describes how to use Aerospike's backup and restore tools for Aerospike Vector Search (AVS). AVS uses the Aerospike Database (ASDB) as a storage layer, so you can leverage the same tools and similar processes for backup and restore as you would in a standard ASDB deployment. Backing up indexes can save time and compute resources if you need to reuse a specific index in the future.

  • To back up and restore AVS, use Aerospike's backup and restore tools directly against the underlying ASDB cluster.

  • AVS uses metadata and storage namespaces. Both of these namespaces must be backed up and restored together to ensure a functional AVS deployment.

  • All index metadata must be backed up and restored in full, but you can back up individual indexes by specifying the namespace and set where the index and vector data are stored.

  • AVS must be shut down before performing a restore operation. Do not start AVS until the index metadata restore is finished to ensure it can properly discover the restored indexes.

caution

The metadata namespace stores information for all indexes. If you back up the metadata and a single index of an AVS deployment with multiple indexes, restoring to an empty AVS deployment writes metadata for indexes that do not exist in the deployment.

tip

Before starting the following procedures, you should be familiar with the AVS data model and underlying Aerospike Database configuration.

Backup

AVS stores data across multiple Aerospike namespaces, an index metadata namespace and a storage namespace at the very least. These namespaces must be backed up and restored together.

note

All index metadata must be backed up and restored in full, but you can back up individual indexes by specifying the namespace and set where the index and vector data are stored.

Consider the case where AVS stores metadata in the default proximus-meta namespace, and vector and index data in the test namespace. The following example backs up all AVS data in the proximus-meta and test namespaces.

  1. Use asbackup to back up the AVS vector and index data into the vector_data directory.

    asbackup -n "test" -d vector_data -h AEROSPIKE_IP
  2. Use asbackup to back up the AVS index metadata from the Aerospike cluster to the index_meta directory.

    asbackup -n "proximus-meta" -d index_meta -h AEROSPIKE_IP

Restore

caution

You must shut down AVS before starting any restore operations.

  1. Use asrestore to restore the index metadata.

    asrestore -d index_meta -h AEROSPIKE_IP
  2. Start AVS to begin discovery of the restored indexes. You can use AVS to search the restored indexes while vector and index data restoration is in progress (step 3).

    sudo systemctl start aerospike-proximus
  3. Use asrestore to restore the vector and index data.

    asrestore -d vector_data -h AEROSPIKE_IP