psm MySQLCS backup

Performs an on-demand backup of an MySQL Cloud Service instance.


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

psm MySQLCS backup -s|--service-name instance-name 
    [-a|--backup-type FULL] [--keep-forever true|false] 
    [-n|--notes "notes"] 
    [-wc|--wait-until-complete true|false]
    [-of|--output-format json|html|short]


Parameter Description

-s|--service-name instance-name

Specifies the name of the MySQL Cloud Service instance.


(Optional) Specifies the type of backup. Only FULL is supported at this time.

—k|--keep-forever true|false

(Optional) Specifies if the backup should be kept past the defined backup expiry date. Default value is false.


(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.


The following example performs a full backup on MySQL57–aas instance, specifying that the backup be kept past the default expiration date.

$ psm MySQLCS backup --service-name MySQL57–aas --backup-type FULL --keep-forever true --notes "full backup before migration"