Documentation Home
MySQL Enterprise Backup 4.1 User's Guide
Related Documentation Download this Manual
PDF (US Ltr) - 1.3Mb
PDF (A4) - 1.3Mb


MySQL Enterprise Backup 4.1 User's Guide  /  ...  /  Restoring a Backup from Cloud Storage to a MySQL Server

5.1.5 Restoring a Backup from Cloud Storage to a MySQL Server

To restore a backup image from cloud storage to datadir on the server, use the cloud storage options, and also the --backup-dir option to specify the temporary directory into which temporary output, status files, and backup metadata will be saved:

Example 5.9 Restoring a Single-file Backup from an Oracle Cloud Infrastructure (OCI) Object Storage Classic Container to a MySQL Server

mysqlbackup \
--defaults-file=<my.cnf> \
--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=<backup_image_name> \
--datadir=/home/user/dba/datadir \ 
--backup-dir=/home/user/dba/orbackuptmpdir \
--backup-image=- \
copy-back-and-apply-log

Example 5.10 Restoring a Single-file Backup from an Oracle Cloud Infrastructure (OCI) Object Storage to a MySQL Server

mysqlbackup \
--defaults-file=<my.cnf> \
--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_image_name> \
--datadir=<server_datadir> \ 
--backup-dir=/home/user/dba/orbackuptmpdir \
--backup-image=- \
copy-back-and-apply-log

Example 5.11 Restoring a Cloud Incremental Backup from an Oracle Cloud Infrastructure (OCI) Object Storage Service to a MySQL Server

mysqlbackup \--defaults-file=<my.cnf> \
--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_image_name> \
--backup-image=- --datadir=<server_datadir> \
--backup-dir=/home/user/dba/orincrbackuptmpdir \
--incremental 
copy-back-and-apply-log

Example 5.12 Restoring a Single-file Backup from an OpenStack Object Storage to a MySQL Server

mysqlbackup \
--defaults-file=<my.cnf> \
--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-object=image_800.mbi \
--backup-dir=/home/user/dba/swiftbackuptmpdir \
--datadir=/home/user/dba/datadir \ 
--backup-image=- \
copy-back-and-apply-log

Example 5.13 Restoring a Single-file Backup from Amazon S3 to a MySQL Server

mysqlbackup\
--defaults-file=<my.cnf> \
--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 \
--datadir=/home/user/dba/datadir \
--backup-image=- \
copy-back-and-apply-log