Documentation Home
MySQL Enterprise Backup 3.12 User's Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.1Mb
PDF (A4) - 1.1Mb
HTML Download (TGZ) - 175.7Kb
HTML Download (Zip) - 201.2Kb


4.3.5.3 Backing Up to Cloud Storage

MySQL Enterprise Backup supports cloud backups. Only single-file backups can be created on and restored from a cloud storage. All mysqlbackup options compatible with single-file operations (including, for example, the incremental, compression, partial, and encryption options) can be used with cloud backups or restores.

Note

See Appendix B, Limitations of MySQL Enterprise Backup for some limitations regarding the support for cloud storage by mysqlbackup.

Currently, MySQL Enterprise Backup supports two types of cloud storage services: OpenStack Swift or compatible object storage services (for example, Oracle Cloud Infrastructure Object Storage and Oracle Cloud Infrastructure Object Storage Classic) and Amazon S3.

Note

Due to some issues, Amazon S3 is currently not supported by MySQL Enterprise Backup 3.12.

MySQL Enterprise Backup 3.12 supports the Swift v1.0 API, and also the OpenStack Identity (Keystone) API v2.0 for authentication. It also supports authentication using Swift's TempAuth system. Backups are stored as dynamic large objects in Swift, with each backup larger than 5G being split into multiple parts with names in the form of <object_name>_part_<number>. See the OpenStack documentation for details.

A cloud backup is created using the cloud options for mysqlbackup, which are described in details in Section 14.14, “Cloud Storage Options”. Here are some sample commands for creating a cloud backup:

Example 4.18 Creating a Cloud Backup on Oracle Cloud Infrastructure Object Storage Classic

This example creates a cloud backup in an Oracle Cloud Infrastructure (OCI) Object Storage Classic container, using the TempAuth system for authenticating the user's credentials.

mysqlbackup \
--cloud-service=openstack  --cloud-container=<OCI Object Storage Classic container> \
--cloud-user-id=<serviceInstanceName>-<identityDomainName>:<userName> --cloud-password='<password>' \
--cloud-tempauth-url=https://<dataCenterCode>.storage.oraclecloud.com \
--cloud-trace=1 --cloud-object=image_900.mbi \
--backup-dir=/home/user/dba/orbackuptmpdir \
--backup-image=- \
backup-to-image


Example 4.19 Creating a Cloud Backup on Oracle Cloud Infrastructure Object Storage

This example creates a cloud backup in an Oracle Cloud Infrastructure (OCI) Object Storage bucket, using HTTP basic authentication.

mysqlbackup \
--cloud-service=openstack  --cloud-container=<OCI Object Storage bucket> \
--cloud-user-id=<OCI userName> --cloud-password='<OCI auth token>' \
--cloud-ca-info=/etc/ssl/certs/ca-certificates.crt 
--cloud-basicauth-url=https://swiftobjectstorage.<region>.oraclecloud.com/v1/<OCI Object Storage namespace> \
--cloud-trace=1 --cloud-object=backup_image_900.mbi \
--backup-dir=/home/user/dba/orbackuptmpdir \
--backup-image=- \
backup-to-image


Example 4.20 Creating a Cloud Incremental Backup on Oracle Cloud Infrastructure Object Storage

This example creates an incremental cloud backup in an Oracle Cloud Infrastructure (OCI) Object Storage bucket, using HTTP basic authentication.

mysqlbackup \
--cloud-service=openstack  --cloud-container=<OCI Object Storage bucket> \
--cloud-user-id=<OCI userName> --cloud-password='<OCI auth token>' \
--cloud-ca-info=/etc/ssl/certs/ca-certificates.crt 
--cloud-basicauth-url=https://swiftobjectstorage.<region>.oraclecloud.com/v1/<OCI Object Storage namespace> \
--cloud-object=backup_incr_image_900.mbi \
--incremental-backup-dir=/home/user/dba/orincrbackuptmpdir \
--incremental --incremental-base=history:last_backup \
--backup-image=- \
backup-to-image


Example 4.21 Creating a Cloud Backup on an OpenStack Object Storage

This example creates a cloud backup on an OpenStack object storage, using the Keystone identity service to authenticate the user's credentials.

mysqlbackup \
--include-tables=testdb.t1 --use-tts=with-full-locking \
--cloud-service=openstack  --cloud-container=<swift container> \
--cloud-user-id=<keystone user> --cloud-password=<keystone password> \
--cloud-region=<keystone region> --cloud-tenant=<keystone tenant> \
--cloud-identity-url=<keystone url>  \
--cloud-trace=1 --cloud-object=image_800.mbi \
--backup-dir=/home/user/dba/opbackuptmpdir \
--backup-image=- \
backup-to-image


Example 4.22 Creating a Cloud Backup on Amazon S3

mysqlbackup\
--cloud-service=s3 --cloud-aws-region=<aws region> \
--cloud-access-key-id=<aws access key id> --cloud-secret-access-key=< aws secret access key> \
--cloud-bucket=<s3 bucket name> --cloud-object-key=<aws object key> \
--backup-dir=/home/user/dba/s3backuptmpdir \
--backup-image=- \
backup-to-image


Besides backup-to-image, all other mysqlbackup operations for single-file backups (backup-dir-to-image, list-image, validate, image-to-backup-dir, extract, copy-back, and copy-back-and-apply-log) can also be performed with cloud storage. For example:

Example 4.23 Extract an Existing Image from an Oracle Cloud Infrastructure Object Storage Classic Container to a Backup Directory

Extract a backup image from an Oracle Cloud Infrastructure Object Storage Classic container, using the --backup-dir option to specify the directory into which the image will be extracted:

mysqlbackup \
--cloud-service=openstack  --cloud-container=<OCI Object Storage Classic container> \
--cloud-user-id=<serviceInstanceName>-<identityDomainName>:<userName> --cloud-password=<password> \
--cloud-tempauth-url=https://<dataCenterCode>.storage.oraclecloud.com \
--cloud-object=image_930.mbi \
--backup-dir=/home/user/dba/orbackupdir \
--backup-image=- \
image-to-backup-dir


Example 4.24 Extract an Existing Image from Amazon S3 Cloud Storage to a Backup Directory

Extract a backup image from Amazon S3, using the --backup-dir option to specify the directory into which the image will be extracted:

mysqlbackup\
--cloud-service=s3 --cloud-aws-region=<aws region> \
--cloud-access-key-id=<aws access key id> --cloud-secret-access-key=< aws secret access key> \
--cloud-bucket=<s3 bucket name> --cloud-object-key=<aws object key> \
--backup-dir=/home/user/dba/s3backupdir \
--backup-image=- \
image-to-backup-dir


See Section 5.2.5, “Restoring a Backup from Cloud Storage to a MySQL Server” on how to restore a backup image from a cloud storage.


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.