ABS configuration file examples
This page explains the sections of an example backup configuration file illustrating the basic requirements for a backup configuration.
Aerospike publishes a JSON schema for this configuration file that enables autocomplete and validation in the VSCode and IntelliJ editors.
View full configuration file
# yaml-language-server: $schema=https://raw.githubusercontent.com/aerospike/aerospike-backup-service/refs/tags/v3.1.0/docs/config.schema.jsonaerospike-clusters: abs-cluster: # <--- Custom user-defined cluster name seed-nodes: - host-name: localhost port: 3000 credentials: user: tester password: secret:asbackup:psw # Password will be fetched from the secret agent secret-agent-name: secret-agent # <--- Refers to the secret agent name under secret-agents
secret-agents: secret-agent: # <--- Custom user-defined secret agent name address: localhost port: 5000 connection-type: tcp
storage: s3: # <--- Custom user-defined storage name s3-storage: # Storage type; can be one of "local-storage", "s3-storage", "azure-storage", "gcp-storage" path: backups bucket: as-backup-bucket s3-region: eu-central-1 min-part-size: 50_000_000 # Upload chunk size in bytes (May affect performance)
backup-policies: dailyBackupPolicy: # <--- Custom user-defined policy name parallel: 8 # Parallelism level (May affect performance) file-limit: 1000 # Max backup file size in MB (May affect performance) compression: # Backup files will be compressed before uploading (May affect performance) mode: ZSTD level: 1 retention: full: 10 # Retain 10 full backups incremental: 5 # Retain incremental backups for the 5 latest full backups
backup-routines: dailyLocalBackupRoutine: # <--- Custom routine name interval-cron: "@daily" # Full backup will be triggered daily at midnight incr-interval-cron: "0 */2 * * * *" # Incremental backups every 2 hours source-cluster: abs-cluster # <--- Refers to the cluster name under aerospike-clusters storage: s3 # <--- Refers to the storage name under storage backup-policy: dailyBackupPolicy # <--- Refers to the policy name under backup-policies
Configuration file components
aerospike-clusters
This example configuration connects to the Aerospike Database cluster named abs-cluster
.
The seed-nodes
parameter defines the host and port for the Aerospike cluster on the network.
The credentials
parameter passes a plaintext username and a reference to a password stored in the secret agent. You can also use a plain text username and password without the secret agent reference for testing purposes.
max-parallel-scans
sets a global limit on the number of concurrent backups.
aerospike-clusters: abs-cluster: # <--- Custom user-defined cluster name seed-nodes: - host-name: localhost port: 3000 credentials: user: tester password: secret:asbackup:psw # Password will be fetched from the secret agent secret-agent-name: secret-agent # <--- Refers to the secret agent name under secret-agents
secret-agents
The secret-agents
section defines one or more connections to the Aerospike Secret Agent.
secret-agents: secret-agent: # <--- Custom user-defined secret agent name address: localhost port: 5000 connection-type: tcp
storage
The storage
section sets up four different storage destinations: local, S3, Azure, and GCP.
Each one has a separate label, here storage1
, storage2
, and so on.
You can set up as many or as few destinations as you want in your own configuration.
Note the specific authentication requirements for the different cloud storage providers.
storage: s3: # <--- Custom user-defined storage name s3-storage: # Storage type; can be one of "local-storage", "s3-storage", "azure-storage", "gcp-storage" path: backups bucket: as-backup-bucket s3-region: eu-central-1 min-part-size: 50_000_000 # Upload chunk size in bytes (May affect performance)
Additional storage examples:
storage: # Example 1: Local Storage storage1: local-storage: path: /local/backups
# Example 2: S3 Storage storage2: s3-storage: bucket: my-backup-bucket path: backups s3-profile: default s3-region: eu-central-1
# Example 3: Azure Storage storage3: azure-storage: account-name: my-storage-account account-key: my-secret-key container-name: my-container endpoint: 'https://my-storage-account.blob.core.windows.net' path: backups
# Example 4: GCP Storage storage4: gcp-storage: bucket-name: my-gcp-bucket key-file: /path/to/service-account-key.json endpoint: 'https://storage.googleapis.com' path: backups
backup-policies
A backup policy is a set of parameters that define how to perform a backup. You can create many different policies, then schedule each to run at different times or under different circumstances.
This example section defines a policy called dailyBackupPolicy
, which is later scheduled to run daily in the backup-routines
stanza.
With parallel
, it specifies the number of parallel reader threads that read Aerospike partitions.
You can also specify the size of each backup file with file-limit
in MB, as well as a compression algorithm and compression level with compression
.
In the retention
section, this example specifies that the previous 10 full backups are retained in storage, in addition to any incremental backups made during the last 5 full backups.
backup-policies: dailyBackupPolicy: # <--- Custom user-defined policy name parallel: 8 # Parallelism level (May affect performance) file-limit: 1000 # Max backup file size in MB (May affect performance) compression: # Backup files will be compressed before uploading (May affect performance) mode: ZSTD level: 1 retention: full: 10 # Retain 10 full backups incremental: 5 # Retain incremental backups for the 5 latest full backups
backup-routines
The backup-routines
section schedules one or more routines to run from specified sources at specified intervals.
In this example, the routine dailyLocalBackupRoutine
backs up the entire source cluster abs-cluster
to the storage destination s3
, following the rules defined in dailyBackupPolicy
.
This routine performs full and incremental backups based on cron intervals. It performs an incremental backup every two hours and a full backup each day at midnight.
backup-routines: dailyLocalBackupRoutine: # <--- Custom routine name interval-cron: "@daily" # Full backup will be triggered daily at midnight incr-interval-cron: "0 */2 * * * *" # Incremental backups every 2 hours source-cluster: abs-cluster # <--- Refers to the cluster name under aerospike-clusters storage: s3 # <--- Refers to the storage name under storage backup-policy: dailyBackupPolicy # <--- Refers to the policy name under backup-policies
GitHub repository example files
This section explains the two sample configuration files included in the ABS GitHub repository.
Default Docker Compose ABS Configuration:
The following sample backup service configuration supplied with the Docker Compose stack for ABS consists of four sections:
aerospike-clusters
defines the location and access credentials for ABS to communicate to the Aerospike database, calling that clusterabsCluster1
. Since this is a Docker Compose stack, it uses the Aerospike Database Docker container name"aerospike-cluster"
as the hostname instead of an IP address.storage
defines the location of the storage for database backups. Here, it creates a storage type calledminioStorage
that uses thes3-endpoint-override
parameter to send backed up data to MinIO instead of Amazon S3. You can define multiple storage types that can later be used in multiple backup policies.- In
backup-policies
, a new policy calleddefaultPolicy
is defined with simple instructions to run in a single thread and keep all previous backups. A policy is a set of instructions defining how to do a specific type of backup. You can define multiple policies that can be used in various backup routines. backup-routines
specifies a routine calledminioRoutine
that runs thedefaultPolicy
policy daily for full backups and hourly for incremental backups. Routines specify the source cluster to back up data from, a storage type as defined under thestorage
section, and a namespace from the source cluster to back up. You can define multiple routines that can be run according to different schedules or on demand.
aerospike-clusters: absCluster1: seed-nodes: - host-name: "aerospike-cluster" port: 3000 credentials: user: admin password: admin
storage: s3-storage: bucket: my-backup-bucket path: backups s3-profile: default s3-region: eu-central-1 s3-endpoint-override: http://minio:9000
backup-policies: defaultPolicy: # Run backup operations in a single thread. parallel: 1
backup-routines: minioRoutine: # 24 hours interval for full backups. interval-cron: "@daily" # 1 hour interval for incremental backups. incr-interval-cron: "@hourly" source-cluster: absCluster1 storage: minioStorage namespaces: ["test"] backup-policy: defaultPolicy
Default Linux ABS Configuration:
The default configuration file supplied with Linux distributions is smaller and simpler than the configuration in the Docker Compose setup.
By default, it sets up a connection to a namespace called "test"
in an Aerospike database accessible at 127.0.0.1:3000
.
It stores backup files locally at /var/lib/aerospike-backup-service
.
aerospike-clusters: cluster1: use-services-alternate: false seed-nodes: - host-name: "127.0.0.1" port: 3000 credentials: user: "admin" password: "admin"
storage: minioStorage: s3-storage: bucket: my-backup-bucket path: backups s3-profile: default s3-region: eu-central-1 s3-endpoint-override: http://minio:9000
backup-policies: policy1: parallel: 1
backup-routines: routine1: interval-cron: "@weekly" incr-interval-cron: "@daily" backup-policy: "policy1" source-cluster: "cluster1" storage: "local1" namespaces: ["test"]