psm MySQLCS restore

Restores a backup to a MySQL Cloud Service instance.

Syntax

In the following syntax, line breaks have been added for clarity. Do not include them when entering the command.

psm MySQLCS restore -s|--service-name instance-name 
    -b|--backup-id backup-id 
    [-e|--restore-type restore-type -t|--restore-id ”dd/mm/yyyy hh:mm:ss"]
    [-n|--notes string]
    [-wc|--wait-until-complete true|false]
    [-of|--output-format json|html|short]

Parameters

Parameter Description

-s|--service-name instance-name

Specifies the name of the MySQL Cloud Service instance.

—b|--backup-id

Specifies the unique identifier of the backup to restore.

—e|--restore-type

(Optional)The type of restore to perform. Possible values are:

  • PIT: Point-In-Time restore. Requires —restore-id.

—t|--restore-id

(Optional)The unique identifier of the restore. These are used only for Point-In-Time restores. The value takes the following format: ”dd/mm/yyyy hh:mm:ss”

—n|--notes string

(Optional) Enables the addition of explanatory notes. Notes must be enclosed in quotation marks.

–wc|--wait-until-complete true|false

(Optional) If set to true, the command behaves synchronously. That is, it does not return until the submitted job is complete. The following message is displayed until the job is complete:

Waiting for the job to complete... (it cannot be cancelled)

The default value is false.

-of|--output-format json|html|short

(Optional) Specifies the output format of the command’s response:

  • json—output is formatted as a JSON array.

  • html—output is formatted as HTML

  • short—output is formatted as a brief summary.

The default output format is the one you specified when using the psm setup command to configure the psm CLI.

Note:

If MySQL Transparent Data Encryption (TDE) is enabled on the MySQL instance, it is not currently possible to restore a backup of that instance.

Examples

The following example restores the backup with id 00db56ff-445f-4e35–fr45–5aeeed113701b to the MySQL57–aas instance.

$ psm MySQLCS restore --service-name MySQL57-aas --backup-id 00db56ff-445f-4e35–fr45–5aeeed113701b

The following is an example of a Point-In-Time restore, restoring a backup dated 06/12/2016 17:20:55 to the MySQL57–aas instance:

psm MySQLCS restore -s MySQL57-aas --restore-type PIT --restore-id "06/12/2016 17:20:55"