Skip to main content
Loading
Version: Operator 4.0.0

Configuration Settings for an Aerospike Backup on Kubernetes

Overviewโ€‹

Aerospike Backup configuration settings are in the Aerospike Backup Custom Resource (CR). Aerospike Kubernetes Operator (AKO) monitors this file to schedule backups or trigger an immediate on-demand backup.

The AerospikeBackup Custom Resource Definition (CRD) specifies the CR structure that AKO uses to configure and create the backup.

CR examplesโ€‹

CR examples are available in the main Aerospike Kubernetes Operator repository.

Example 1: CR with scheduled backupsโ€‹

This example schedules periodic full and incremental backups for an Aerospike cluster.

Example 1
apiVersion: asdb.aerospike.com/v1beta1
kind: AerospikeBackup
metadata:
name: aerospikebackup
namespace: aerospike
spec:
backupService:
name: aerospikebackupservice
namespace: aerospike
config:
aerospike-cluster:
# Name format: The name must begin with the prefix <backup-namespace>-<backup-name>
aerospike-aerospikebackup-test-cluster:
credentials:
password: admin123
user: admin
seed-nodes:
- host-name: aerocluster.aerospike.svc.cluster.local
port: 3000
backup-routines:
# Name format: The name must begin with the prefix <backup-namespace>-<backup-name>
aerospike-aerospikebackup-test-routine:
backup-policy: test-policy
interval-cron: "@daily"
incr-interval-cron: "@hourly"
namespaces: ["test"]
source-cluster: aerospike-aerospikebackup-test-cluster
storage: local

Example 2: CR with scheduled backups with a password file pathโ€‹

This example schedules periodic Full and Incremental backups for an Aerospike cluster with a password file path.

Example 2
apiVersion: asdb.aerospike.com/v1beta1
kind: AerospikeBackup
metadata:
name: aerospikebackup
namespace: aerospike
spec:
backupService:
name: aerospikebackupservice
namespace: aerospike
config:
aerospike-cluster:
# Name format: The name must begin with the prefix <backup-namespace>-<backup-name>
aerospike-aerospikebackup-test-cluster:
credentials:
# Make sure the password file is mounted in the backup service pod via secret at the path specified here.
password-path: /etc/aerospike/secret/password
user: admin
seed-nodes:
- host-name: aerocluster.aerospike.svc.cluster.local
port: 3000
backup-routines:
# Name format: The name must begin with the prefix <backup-namespace>-<backup-name>
aerospike-aerospikebackup-test-routine:
backup-policy: test-policy
interval-cron: "@daily"
incr-interval-cron: "@hourly"
namespaces: ["test"]
source-cluster: aerospike-aerospikebackup-test-cluster
storage: local

Configurationโ€‹

The initial part of the CR file selects the CRD and the namespace to use for the Aerospike Backup.

apiVersion: asdb.aerospike.com/v1beta1
kind: AerospikeBackup
metadata:
name: aerospikebackup
namespace: aerospike

The rest of this page explains the parameters in the subsequent parts of the CR file.

Specโ€‹

The spec section defines the backup's configurations.

FieldRequiredTypeDefaultDescription
backupServiceYesStructureAerospike backup service reference.
config
Dynamic
YesStructureAerospike backup configuration in freeform YAML format.
onDemandBackups
Dynamic
NoStructurenilList of on-demand backups to be triggered.

Backup Serviceโ€‹

spec -> backupService

Configure the Aerospike backup service to be used for taking backups.

FieldRequiredTypeDescription
nameYesStringName of the backup service.
namespaceYesStringNamespace of the backup service.

Configโ€‹

spec -> config

The YAML form of Aerospike Backup configuration. The following fields can be defined in the Aerospike Backup configuration:

  • aerospike-cluster: only one Aerospike cluster can be configured.
  • backup-routines: multiple backup routines can be configured.

Example:

config:
aerospike-cluster:
# Name format: The name must begin with the prefix <backup-namespace>-<backup-name>
aerospike-aerospikebackup-test-cluster:
credentials:
password: admin123
user: admin
seed-nodes:
- host-name: aerocluster.aerospike.svc.cluster.local
port: 3000
backup-routines:
# Name format: The name must begin with the prefix <backup-namespace>-<backup-name>
aerospike-aerospikebackup-test-routine:
backup-policy: test-policy
interval-cron: "@daily"
incr-interval-cron: "@hourly"
namespaces: ["test"]
source-cluster: aerospike-aerospikebackup-test-cluster
storage: local

Resource naming rule:โ€‹

aerospike-cluster and backup-routines names must start with a prefix <backup-namespace>-<backup-name>. The prefix is the namespace and name of the backup CR.

See the Aerospike Backup Configuration reference for more details.

On-demand Backupsโ€‹

spec -> onDemandBackups

Configure the on-demand backups for an Aerospike cluster.

FieldRequiredTypeDescription
idYesStringUnique identifier for the on-demand request operation in the CR.
routineNameYesStringRoutine name to use to trigger on-demand backup.
delayNoStringDelay interval before starting the on-demand backup.