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. You can declare the cluster slice by racks with rack-list, by nodes with node-list, or by partitions with partition-list.

ABS treats every backup routine as an independent job definition.

If you configure two backup routines on separate ABS instances that share the same source cluster and storage destination, and differ only in the slice each routine reads, you can start both routines at the same time, double the aggregate scan bandwidth, and still end up with a complete and non-overlapping backup set.

rack-list, node-list, and partition-list are mutually exclusive fields.

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 ABS configuration file examples and ABS configuration file reference for more example configuration files and information about additional parameters.

Backup routines

Each tab below shows two backup routines that differ only in their cluster slice.

Assign each routine a slice that does not overlap the others: together they 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:asd.aerospike.com:4333
- 10.0.48.8:asd.aerospike.com: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:asd.aerospike.com:4333
- 10.0.48.10:asd.aerospike.com:4333
- 10.0.48.11:asd.aerospike.com:4333

node-list limits each routine to the partitions owned by the listed nodes at the moment the job starts. 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 in one data center.

Example parallel backup and restore workflow

This section outlines a series of steps to write test records to a namespace, set up parallel backups with ABS, run the backups, and restore the database.

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. The legacy /v1/backups/schedule/{routine} endpoint is deprecated, but still supported. Each routine writes to parallel-backup-test/fullBackupA/<timestamp> or parallel-backup-test/fullBackupB/<timestamp>.

  3. Inspect the metadata.yaml file in each namespace’s subdirectory inside the backup output directory. Their record-count values should sum to the expected total of 1000000. ABS writes one metadata file per namespace, per routine.

Restore test data

  1. Truncate the target cluster so the restore starts without any data present. Run the three following 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

    The manage truncate command removes all records immediately.

  2. Create separate request bodies for your restore requests.

    restoreA.json
    {
    "routine": "fullBackupA",
    "time": '"$(($(date +%s)*1000))"',
    "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": '"$(($(date +%s)*1000))"',
    "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/2025-04-10T12:34:02Z -H "Content-Type: application/json" -d @restoreA.json
    curl -X POST http://service2:8080/v1/restore/2025-04-10T12:34:28Z -H "Content-Type: application/json" -d @restoreB.json

    The JSON body follows the schema in the API 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 per-reader threads with parallel in a backup policy and per-writer threads with parallel-write. Adjust writer batch size with batch-size in the restore request.

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

Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?