Skip to content

Parallel backups

For the complete documentation index see: llms.txt

All documentation pages available in markdown.

You can run two or more identical Aerospike Backup Service (ABS) instances, each pointed at a different slice of the cluster, to back up and restore the full data set in parallel.

Cluster slices

A routine can back up one slice of a namespace. Declare the slice with rack-list, node-list, or partition-list. These three fields are mutually exclusive. A routine with a slice backs up only part of the namespace, so restore every slice to recover the full data set.

ABS treats every backup routine as an independent job definition. Two routines on separate ABS instances can share the same source cluster and storage destination and differ only in the slice each one reads. Start both routines at the same time to double the aggregate scan bandwidth and still end up with a complete, non-overlapping backup set.

Cluster-level prefer-racks is a different control. It still backs up every partition, but prefers local replicas. Omit it when a routine sets rack-list, node-list, or partition-list. See Rack-aware backup: prefer-racks vs rack-list.

Prerequisites

  • A running Aerospike Database deployment
  • Two or more ABS instances
  • asbench (for generating test data)
  • asadm (for verifying test data restoration)

Configuration file sections

The following example shows the minimum content necessary for the first part of the configuration file, aerospike-backup-service.yml.

The aerospike-clusters and storage sections are identical between ABS instances in a parallel deployment. Only the cluster slice changes between the two backup routines in the backup-routines section.

aerospike-clusters:
absDefaultCluster:
seed-nodes:
- host-name: 10.0.48.7
port: 4333
tls-name: asd.aerospike.com
credentials:
user: tester
password: psw
tls:
name: asd.aerospike.com
ca-file: /etc/ssl/certs/ca.aerospike.com.pem
storage:
gcp:
gcp-storage:
bucket-name: abs-testing-bucket
path: parallel-backup-test

See Configure ABS and ABS configuration file reference for more example configuration files and information about additional parameters.

Backup routines

The following tabs show two backup routines that differ only in their cluster slice.

Assign each routine a slice that does not overlap the others. Together, the slices must cover every partition you intend to back up, with no partition scanned by more than one routine.

First ABS instance YAML file
backup-routines:
fullBackupA:
source-cluster: absDefaultCluster
storage: gcp
interval-cron: '@daily'
namespaces: [source-ns1]
node-list:
- 10.0.48.7:4333
- 10.0.48.8:4333
Second ABS instance YAML file
backup-routines:
fullBackupB:
source-cluster: absDefaultCluster
storage: gcp
interval-cron: '@daily'
namespaces: [source-ns1]
node-list:
- 10.0.48.9:4333
- 10.0.48.10:4333
- 10.0.48.11:4333

node-list limits each routine to partitions whose primary replica is on one of the listed nodes when the job starts. Each entry is <IP>:<port>, <hostname>:<port>, or a node ID. ABS compares an address entry with the value that asinfo -v "service-tls-std" returns for the node, or asinfo -v "service-clear-std" when the node has no TLS service, so on a TLS-enabled node the entry must use the TLS port. The entry must equal the whole value, so use the node ID for a node that advertises more than one address. A TLS name in the entry, such as 10.0.48.7:asd.aerospike.com:4333, matches no node and fails the backup. Use node-list when you run multiple ABS instances in parallel and want each instance to back up a fixed set of cluster nodes, such as nodes in one availability zone or datacenter. If partition ownership changes during a long backup, see the topology note in rack-list.

Example parallel backup and restore workflow

Follow this end-to-end workflow to populate a namespace with test data, configure parallel backups using ABS, and verify the process through a full database restore.

Execute a parallel backup test

  1. Generate test data using asbench.

    The benchmark tool writes one million 1 KiB records into the namespace:

    Terminal window
    asbench -U tester -P psw -h 10.0.48.7:asd.aerospike.com:4333 -n source-ns1 -w I -k 1000000 -o B960 --tls-enable --tls-cafile=/etc/ssl/certs/ca.aerospike.com.pem

    See the asbench documentation for more information.

  2. Start each backup routine separately through the REST API:

    Terminal window
    curl -X POST http://service1:8080/v1/backups/full/fullBackupA
    curl -X POST http://service2:8080/v1/backups/full/fullBackupB

    A POST request to the /v1/backups/full/{routine} endpoint triggers an immediate full backup, regardless of how the backup routine is scheduled in its interval-cron parameter. Each routine writes to parallel-backup-test/fullBackupA/backup/<timestamp>/data/<namespace> or parallel-backup-test/fullBackupB/backup/<timestamp>/data/<namespace>.

  3. Inspect the metadata.yaml file in each namespace’s subdirectory of each routine’s backup output directory. Confirm that the record-count values sum to 1000000.

Restore test data

  1. Truncate the target cluster so the restore starts without any data present. Run the following three commands in sequence.

    Terminal window
    asadm -h 10.0.48.7:asd.aerospike.com:4333 -U tester -P psw --tls-enable --tls-cafile=/etc/ssl/certs/ca.aerospike.com.pem
    Admin> enable
    Admin+> manage truncate ns source-ns1
  2. Create separate request bodies for your restore requests.

    restoreA.json
    {
    "routine": "fullBackupA",
    "time": 1739538000000,
    "destination": {
    "seed-nodes": [
    {
    "host-name": "10.0.48.7",
    "port": 4333,
    "tls-name": "asd.aerospike.com"
    }
    ],
    "credentials": {
    "user": "tester",
    "password": "psw"
    },
    "tls": {
    "name": "asd.aerospike.com",
    "ca-file": "/etc/ssl/certs/ca.aerospike.com.pem"
    }
    },
    "policy": {
    "parallel": 8,
    "batch-size": 100
    }
    }
    restoreB.json
    {
    "routine": "fullBackupB",
    "time": 1739538000000,
    "destination": {
    "seed-nodes": [
    {
    "host-name": "10.0.48.7",
    "port": 4333,
    "tls-name": "asd.aerospike.com"
    }
    ],
    "credentials": {
    "user": "tester",
    "password": "psw"
    },
    "tls": {
    "name": "asd.aerospike.com",
    "ca-file": "/etc/ssl/certs/ca.aerospike.com.pem"
    }
    },
    "policy": {
    "parallel": 8,
    "batch-size": 100
    }
    }
  3. Restore each routine’s backup with the JSON requests you defined in the previous step.

    Terminal window
    curl -X POST http://service1:8080/v1/restore/timestamp -H "Content-Type: application/json" -d @restoreA.json
    curl -X POST http://service2:8080/v1/restore/timestamp -H "Content-Type: application/json" -d @restoreB.json

    The JSON body follows the schema in API usage examples and includes parallel and batch-size under policy to control writer concurrency.

  4. Verify the object counts:

    Terminal window
    asadm -h 10.0.48.7:4333 -U tester -P psw --tls-enable --tls-cafile=/etc/ssl/certs/ca.aerospike.com.pem
    Admin> info

    Each of the five nodes should report about 200,000 objects and zero migrations.

Scaling guidelines

ABS exposes a cluster-wide throttle with the max-parallel-scans parameter. Keep this value below the total vCPU count of the Aerospike nodes. Adjust the number of readers with parallel in a backup policy and the number of writers with parallel-write. See Aerospike Backup Service performance tuning. Adjust writer batch size with batch-size in the restore request.

You can monitor throughput using the built-in /metrics endpoint, and basic health with /health and /ready.