Property Reference for Backup and Restore

In this topic
Properties for the MySQLBackupLocation Resource
Properties for the Secret
Properties for the MySQLBackupSchedule Resource
Properties for the MySQLBackup Resource
Properties for the MySQLRestore Resource

Page last updated:

This topic contains property reference tables for the resources that you create for performing backup and restore. For information about backup and restore, see Backing Up and Restoring MySQL Instances.

Properties for the MySQLBackupLocation Resource

The table below explains the properties that can be set for the MySQLBackupLocation resource.

Property Type Default Description Example Req?
metadata.name String n/a The name of the MySQLBackupLocation. Must be unique within a namespace. backuplocation-sample Yes
spec.storage.s3.bucket String n/a The name of an existing S3-compatible bucket for this backup location. s3-bucket-sample Yes
spec.storage.s3.bucketPath String n/a The name of the path where backup artifacts will be uploaded. If a folder in the path does not already exist, it is created automatically. The trailing slash in the path is required. s3-sample-path/sample-subpath/ No
spec.storage.s3.region String us-east-1 The geographic region of the bucket. Some non-AWS S3 implementations do not require this value. us-west-1 No
spec.storage.s3.endpoint String https://
BUCKET-NAME
.s3.REGION
.amazonaws.com/
The endpoint URL for the configured S3-compatible provider. Leave blank for AWS S3. http://minio.default:9000 No
spec.storage.s3.forcePathStyle booleanfalse true forces the use of path-style S3 URLs for compatibility. May be required for some non-AWS S3 providers.
false uses virtual hosted-style S3 URLs.
For information about AWS S3 Path Deprecation, see the AWS blog site.
false No
spec.storage.s3.secret.name String n/a The name of the Kubernetes secret that contains the credentials for connecting to S3. backuplocation-sample-creds Yes

Properties for the Secret

The table below explains the properties that can be set in the secret for the MySQLBackupLocation resource.

Property Type Default Description Example Req?
metadata.name String n/a The name of the Secret. Must match spec.storage.s3.secret.name in a BackupLocation. Must be unique within a namespace. backuplocation-sample-creds Yes
stringData.accessKeyId String n/a The Access Key ID for an AWS IAM user that has permissions to read/write from the S3 bucket. AKIAIOSFODNN7EXAMPLE Yes
stringData.secretAccessKey String n/a The Secret Access Key for an AWS IAM user that has permissions to read/write from the S3 bucket wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY Yes

Properties for the MySQLBackupSchedule Resource

The table below explains the properties that can be set for the MySQLBackupSchedule resource.

Property Type Default Description Example Req?
metadata.name String n/a The name of the MySQLBackupSchedule. Must be unique within a namespace. backupschedule-sample Yes
spec.backupTemplate.spec.location.name String n/a The name of the MySQLBackupLocation that represents the blobstore where backups will be uploaded. Must be in the same namespace as the MySQLBackupSchedule. backuplocation-sample Yes
spec.backupTemplate.spec.instance.name String n/a The name of the MySQL instance on which you want scheduled backups for. Must be in the same namespace as the MySQLBackupSchedule. mysql-sample Yes
spec.schedule String (cron schedule) n/a The cron schedule for backups. Must be a valid cron schedule. "0 23 * * 6" (every Saturday at 11PM) Yes

Properties for the MySQLBackup Resource

The table below explains the properties that can be set for the MySQLBackup resource.

Property Type Default Description Example Req?
metadata.name String n/a The name of the MySQLBackup. Must be unique within a namespace. backup-sample Yes
spec.location.name String n/a The name of the MySQLBackupLocation that represents the blobstore where the backup will be uploaded. Must be in the same namespace as the MySQL instance. backuplocation-sample Yes
spec.instance.name String n/a The name of the MySQL instance on which you want to perform the on-demand backup. my-instance Yes

Properties for the MySQLRestore Resource

The table below explains the properties that can be set for the MySQLRestore resource.

Property Type Default Description Example Req?
metadata.name String n/a The name of the MySQLRestore. Must be unique within a namespace. restore-sample Yes
spec.backup.name String n/a The name of the MySQLBackup that represents the backup artifact to restore. Must be in the same namespace as the MySQLRestore. backup-sample Yes
spec.instanceTemplate MySQL n/a The configuration for the MySQL instance that the backup artifact will be restored to. This MySQL instance is created automatically as part of the restore, so the name must not already exist in the namespace.
For descriptions of each value in the configuration template, see Create a MySQL Instance.
See example below.* Yes
spec.instanceTemplate.spec.imagePullSecretName String n/a The name of the secret used to restore the backup pulled from the instance spec. MySQLRestore will default to use the imagePullSecretName that is configured in the helm chart, when the user does not provide it. tanzu-mysql-image-registry No


* The type MySQL is a nested YAML object. For example:

metadata:
  name: mysql-sample
spec:
  storageSize: 1Gi
  highAvailability:
    enabled: true