Stateful application CRD reference on bare metal
BackupLocation
The BackupLocation CRD parameters differ based on the object store you use.
S3-compliant storage
apiVersion: stork.libopenstorage.org/v1alpha1
kind: BackupLocation
metadata:
name: mysql
namespace: mysql-app
annotations:
stork.libopenstorage.org/skipresource: "true"
location:
type: s3
path: "bucket-name"
s3Config:
region: us-east-1
accessKeyID: XXXX
secretAccessKey: XXXX
endpoint: "https://bucketEndpoint.com"
disableSSL: false
s3Config Parameters
Parameter | Description | Value | Required? |
---|---|---|---|
region | Which region your s3 bucket is located in | Default: None | Yes |
accessKeyID | Your object store's accessKeyID | Default: None | Yes |
secretAccessKey | Your object store's secretAccessKey | Default: None | Yes |
endpoint | The URL or IP address of your bucket | Default: None | Yes |
disableSSL | Whether or not to disable SSL | Default: false | No |
ApplicationBackup
apiVersion: stork.libopenstorage.org/v1alpha1
kind: ApplicationBackup
metadata:
name: backup
namespace: mysql-app
spec:
backupLocation: mysql
namespaces:
- mysql-app
reclaimPolicy: Delete
selectors:
preExecRule:
postExecRule:
Spec Parameters
Parameter | Description | Value | Required? |
---|---|---|---|
backupLocation | What backupLocation object to use to determine where to send the backup | Default: None | Yes |
namespaces | The namespaces to backup | Default: None | Yes |
reclaimPolicy | What happens to objects in the object store when the ApplicationBackup object is deleted | Default: Delete | No |
selectors | Define specific labels to determine which objects and volumes are backed-up | Default: None | No |
preExecRule | Rule to run before performing backup | Default: None | No |
PostExecRule | Rule to run after performing backup | Default: None | No |
ApplicationRestore
apiVersion: stork.libopenstorage.org/v1alpha1
kind: ApplicationRestore
metadata:
name: restore
namespace: mysql-app
spec:
backupName: backup
backupLocation: mysql
namespaceMapping:
<backup_namespace>: <restore_namespace>
replacePolicy: Delete
Spec Parameters
Parameter | Description | Value | Required? |
---|---|---|---|
backupName | The name of the ApplicationBackup you want to restore from | Default: None | Yes |
backupLocation | Which backup location object to get application backups from | Default: None | Yes |
namespaceMapping | A map of source and destination namespaces, allowing you to restore a backup to a different namespace. You must provide the map in key value pairs, with the source namespace as the key and the destination namespace as the value. NOTE: You must run this spec from an admin namespace (kube-system by default). | Default: None | No |
replacePolicy | What happens if matching resources already exist | Default: Retain Enumerated string: Delete, Retain | No |
ApplicationClone
apiVersion: stork.libopenstorage.org/v1alpha1
kind: ApplicationClone
metadata:
name: clone-mysql
namespace: kube-system
spec:
sourceNamespace: mysql-app
destinationNamespace: clone-mysql
selectors:
app: mysql-app-db