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-testSee 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.
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:4333backup-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:4333node-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.
backup-routines: fullBackupA: source-cluster: absDefaultCluster storage: gcp interval-cron: '@daily' namespaces: [source-ns1] partition-list: "0-2048"backup-routines: fullBackupB: source-cluster: absDefaultCluster storage: gcp interval-cron: '@daily' namespaces: [source-ns1] partition-list: "2048-2048"partition-list limits each routine to the partitions in the listed ranges.
Use partition-list when you want fixed partition ranges per ABS instance, for example an even 50/50 split, without tying the slice to current node or rack ownership.
When you specify partition ranges, use the syntax start-count, where the first number is the partition to start at, and the second number is the number of partitions to include.
There are 4096 partitions, so splitting at 0-2048 and 2048-2048 covers all partitions across fullBackupA and fullBackupB.
backup-routines: fullBackupA: source-cluster: absDefaultCluster storage: gcp interval-cron: '@daily' namespaces: [source-ns1] rack-list: - 1backup-routines: fullBackupB: source-cluster: absDefaultCluster storage: gcp interval-cron: '@daily' namespaces: [source-ns1] rack-list: - 2rack-list limits each routine to partitions whose primary replica is on a node in one of the listed racks when the job starts.
This field requires ABS 3.4.0 and later.
Use rack-list when your cluster assigns nodes to racks for availability zones or datacenters and you want each ABS instance to back up one rack slice in parallel.
In a cluster with N racks and evenly distributed primary replicas, one routine per rack often backs up about 1/N of the namespace.
With active rack enabled, all primary replicas sit on the active rack, so routines for other racks might back up few partitions.
If the listed racks or nodes own no primary partitions, the backup fails with a “no primary partitions found” error instead of producing an empty backup.
Rack IDs are non-negative integers configured on the Aerospike cluster.
The example uses 1 and 2 as placeholders on separate ABS instances.
Replace them with the rack IDs from your deployment.
See rack-list and Rack-aware backup: prefer-racks vs 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
-
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.pemSee the
asbenchdocumentation for more information. -
Start each backup routine separately through the REST API:
Terminal window curl -X POST http://service1:8080/v1/backups/full/fullBackupAcurl -X POST http://service2:8080/v1/backups/full/fullBackupBA POST request to the
/v1/backups/full/{routine}endpoint triggers an immediate full backup, regardless of how the backup routine is scheduled in itsinterval-cronparameter. Each routine writes toparallel-backup-test/fullBackupA/backup/<timestamp>/data/<namespace>orparallel-backup-test/fullBackupB/backup/<timestamp>/data/<namespace>. -
Inspect the
metadata.yamlfile in each namespace’s subdirectory of each routine’s backup output directory. Confirm that therecord-countvalues sum to1000000.
Restore test data
-
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.pemAdmin> enableAdmin+> manage truncate ns source-ns1 -
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}} -
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.jsoncurl -X POST http://service2:8080/v1/restore/timestamp -H "Content-Type: application/json" -d @restoreB.jsonThe JSON body follows the schema in API usage examples and includes
parallelandbatch-sizeunderpolicyto control writer concurrency. -
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.pemAdmin> infoEach 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.