Configuration Settings for an Aerospike Backup on Kubernetes
Overviewโ
Aerospike Backup configuration settings are in the Aerospike Backup Custom Resource (CR) file. Aerospike Kubernetes Operator (AKO) reads this file to schedule backups or trigger an immediate backup.
The AerospikeBackup Custom Resource Definition (CRD) specifies the CR structure that the Operator 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.txt
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 AB.
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.
Field | Required | Type | Default | Description |
---|---|---|---|---|
backupService | Yes | Structure | Aerospike backup service reference. | |
config Dynamic | Yes | Structure | Aerospike backup configuration in freeform YAML format. | |
onDemandBackups Dynamic | No | Structure | nil | List of on-demand backups to be triggered. |
Backup Serviceโ
spec
-> backupService
Configure the Aerospike backup service to be used for taking backups.
Field | Required | Type | Description |
---|---|---|---|
name | Yes | String | Name of the backup service. |
namespace | Yes | String | Namespace of the backup service. |
Configโ
spec
-> config
The YAML form of AB configuration. The following fields can be defined in the AB 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 AB Configuration for more details.
On-demand Backupsโ
spec
-> onDemandBackups
Configure the on-demand backups for an Aerospike cluster.
Field | Required | Type | Description |
---|---|---|---|
id | Yes | String | Unique identifier for the on-demand request operation in the CR. |
routineName | Yes | String | Routine name to use to trigger on-demand backup. |
delay | Yes | String | Delay interval before starting the on-demand backup. |