Skip to content

Aerospike Backup Service concepts

For the complete documentation index see: llms.txt

All documentation pages available in markdown.

Aerospike Backup Service (ABS) is a standalone service that backs up and restores Aerospike Database clusters. This page describes the parts of an ABS deployment, what routines and policies are, and how backups and restores work internally.

For the YAML that expresses this model, see Configure ABS. For every field and its default, see the configuration reference.

Applies to

  • Product: Aerospike Backup Service (ABS) 3.7.x.
  • Audience: operators, SREs, and developers who are new to ABS or who design backup routines.
  • Prerequisites: none.
  • Outcome: you can explain what a routine and a policy each control, how full and incremental backups form a restore chain, and which database privileges backup and restore require.

How ABS fits your deployment

ABS runs as a separate service, usually on its own machine or VM. Nothing is installed on the nodes running Aerospike Database.

PartRole
Aerospike DatabaseHolds your records. ABS reads from it during a backup and writes to it during a restore.
ABSSchedules and runs backup and restore jobs, tracks their progress, and serves the REST API and metrics.
Backup storageHolds the backup files: local disk, Amazon S3, Google Cloud Storage, or Azure Blob Storage.

During a backup, ABS reads records as an ordinary database client and never writes to the source cluster. A restore writes only to the cluster the request names as its destination.

ABS does not keep a separate catalog of backups. It discovers what exists by scanning the storage configured for each routine. For example, point a new ABS instance at storage that already has backups, and define a routine with the same name. ABS discovers those backups on startup.

Routines and policies

A backup routine is a scheduled backup job. It names the cluster to back up, the storage to write to, what to include, and when to run. ABS runs each routine on its schedule, and you can also trigger a routine on demand.

A backup policy is a named set of settings for how a backup runs, such as compression, encryption, and how many backups to keep. A routine names one policy. Several routines can refer to the same policy. If a routine doesn’t name a policy, ABS uses the default for each policy setting.

The following routine backs up the test namespace every day, with an incremental backup every two hours:

backup-routines:
daily-test:
source-cluster: prod-cluster # Name under aerospike-clusters
storage: s3-backups # Name under storage
backup-policy: daily-policy # Name under backup-policies
namespaces: ["test"]
interval-cron: "@daily"
incr-interval-cron: "0 0 0/2 * * ? *"
Set on the routineSet on the policy
Source cluster, storage, and policyCompression and encryption
Namespaces, sets, bins, and filter expressionRead and write parallelism
Full and incremental schedulesRetention
Optional schedule timezoneIncremental mode and concurrent incrementals
Optional cluster slice by rack, node, or partitionRecords, indexes, or UDFs to omit

A routine refers to the following named objects for its cluster, storage, and secrets:

ObjectWhat it is
Cluster (aerospike-clusters)How ABS connects to an Aerospike Database cluster (seed nodes, credentials, optional TLS).
Storage (storage)Where backup files are written (local disk, Amazon S3, Google Cloud Storage, or Azure Blob Storage).
Secret Agent (secret-agents)Optional connections to Aerospike Secret Agent, which supplies passwords and encryption keys instead of storing them in plain text. Clusters, storage destinations, and routines can each reference an agent by name.

Each object must exist before a routine can refer to it. Many routines can refer to the same cluster, storage destination, or policy.

Process-level settings such as the listen address, HTTP and HTTPS timeouts, the default schedule timezone, and logging are in a separate service section. They change how ABS runs, not what it backs up. See service.

Scheduled and on-demand backups

A routine’s schedule starts backups without a call to the REST API. interval-cron schedules full backups, and incr-interval-cron schedules incremental backups. Cron fields are evaluated in UTC unless you set schedule-timezone. See Quartz schedules.

POST /v1/backups/full/ROUTINE_NAME and POST /v1/backups/incremental/ROUTINE_NAME run the same routine once, with the same filters, after an optional delay query parameter. A 202 response means ABS scheduled the job. The job can still be skipped, for example when a full backup is already running. Use on-demand backups for tests, after a storage change, or when you need a baseline before a maintenance window.

Schedule overlap

ABS does not queue a skipped run. The routine runs again at its next scheduled time.

  • Two full backups for the same routine do not overlap. If a full backup is still running when the next full backup is due, ABS skips the new full backup.
  • A running incremental backup does not block a full backup. The full backup starts and the incremental job continues.
  • By default, ABS skips a new incremental backup when another backup for the same routine is running.
  • By default, ABS also skips a new incremental backup when a full backup is scheduled at the same time. Set concurrent-incremental to true on the policy to allow both overlaps.
  • An incremental backup that finds no changed records succeeds. ABS records outcome="success" and does not write a new metadata.yaml for namespaces with no changes.

See Monitor ABS for skip, cancel, retry, and empty-incremental signals.

Full and incremental backups

A full backup copies the selected namespaces. If the namespace list is empty (namespaces: []), it backs up every namespace in the cluster.

An incremental backup copies records that changed after a lower-bound timestamp. Incremental backups do not run until at least one full backup has completed successfully. The lower bound depends on incr-mode on the backup policy:

incr-modeWhat the next incremental copies
differential (default)Records changed since the last successful backup, full or incremental.
cumulative (ABS 3.7.0 and later)Records changed since the last successful full backup.

The schedule, the incremental/ storage layout, and the backup APIs are the same for both modes. Cumulative incrementals grow until the next full backup, and a restore by timestamp needs fewer files. See Restores and the backup chain.

Backup files use the Aerospike backup format (.asb). Record data, secondary indexes, set indexes, and user-defined functions (UDFs) are stored in that format unless the policy sets no-records, no-indexes, or no-udfs. When ABS writes a directory backup, metadata such as UDFs and indexes can appear in separate metadata_*.asb files.

metadata.yaml and the incremental chain

On startup or after POST /v1/config/apply, ABS scans each routine’s storage for ROUTINE_NAME/backup/ and ROUTINE_NAME/incremental/ and reads the newest metadata.yaml files.

  • If a full backup metadata.yaml exists, ABS uses it as the baseline.
  • For incr-mode: differential, if a later incremental metadata.yaml exists, ABS uses that later timestamp as the next incremental’s lower bound.
  • For incr-mode: cumulative, the next incremental’s lower bound is the last successful full backup, even when later incrementals exist.
  • If ABS finds no metadata.yaml, it skips incremental jobs until a full backup completes. Logs include incremental backup skipped with a reason such as backup skipped: initial full backup not yet completed.

ABS does not copy backup files when you change a routine’s storage destination. After the change, ABS sees only what already exists in the new destination. See Change backup storage destination.

Restores and the backup chain

Restores do not use a routine. Each restore request carries its own policy and names the storage to read from and the cluster to write to. For timestamp and path restores, see Restore data.

A restore by timestamp loads the latest full backup before that time, then applies incremental backups according to incr-mode. The backup timestamp is the time the job started, not the time it finished. The restore time field is Unix epoch time in milliseconds (an absolute instant). schedule-timezone does not change how that instant is interpreted.

To restore to time T with incr-mode: differential, storage must still contain:

  • The full backup that started most recently before T.
  • Every incremental backup between that full backup and T.

With incr-mode: cumulative, restore-by-timestamp uses that full backup plus the latest incremental that covers T. Intermediate incrementals in the same cycle are not required. The trade-off is more data copied on each incremental run.

Retention (retention.full and retention.incremental on the policy) deletes older backups after a successful full backup. Size retention so a restore still has a complete chain for your recovery point objective.

Complete backups versus cluster slices

By default a routine reads every partition in the namespaces it selects, and the resulting backup is complete and independently restorable.

A routine can instead be restricted to a slice of the cluster, chosen by rack, by node, or by partition range. No single slice restores the whole namespace. To recover the full data set, restore every slice. Slices let several ABS instances back up one cluster in parallel. See Parallel backups.

Preferring a rack doesn’t slice the backup. The backup covers every partition, and prefer-racks changes only which replica ABS reads. See Rack-aware backup: prefer-racks vs rack-list.

Privileges

The Aerospike Database user that ABS uses must be able to read (backup) or write (restore) the target namespaces. These credentials belong to the cluster the routine or restore request names. See aerospike-clusters.

  • Backup: read or higher.
  • Restore of records: read-write.
  • Restore of UDFs: udf-admin (Database 6.0.0 and later) or data-admin.
  • Restore of secondary indexes and set indexes: sindex-admin (Database 6.0.0 and later) or data-admin.

See Configuring access control.