psm MySQLCS update-backup-config

Updates the backup configuration of the 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 update-backup-config -s|--service-name instance-name 
  -c|--config-payload path-to-json-payload
    [-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 instance.

-c|--config-payload

Specifies the path to the JSON payload file.

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

JSON Payload

The json payload has the following syntax:

{
    "defaultRetention":"",
    "fullBackupSchedule":{
        "dayOfWeek":"",
        "hour":"required",
        "minute":""
    },
    "incrementalBackupSchedule":{
        "dayOfWeek":"",
        "hour":"required",
        "minute":""
    },
    "backups":""
}
Parameter Description

"defaultRetention"

Defines the number of days the backup is retained before it is automatically deleted.

"fullBackupSchedule"

Defines the schedule for the full backup. The following parameters must be set:

  • dayOfWeek—the 3–letter code for the day on which the full backup is performed. Wed for Wednesday, for example.

  • hour—the hour of the day at which the full backup is performed. For example, 14 for 2pm

  • Minute—the minute at which the full backup is performed. For example, 30 for 30 minutes past the hour.

"incrementalBackupSchedule"

Defines the schedule for the incremental backup. The following parameters must be set:

  • dayOfWeek—the 3–letter code for the day on which the incremental backup is performed. Wed for Wednesday, for example.

  • hour—the hour of the day at which the incremental backup is performed. For example, 14 for 2pm

  • Minute—the minute at which the incremental backup is performed. For example, 30 for 30 minutes past the hour.

"backups"

Defines whether the backups are enabled. Possible values are ENABLE or DISABLE.

Examples

The following example updates the backup configuration of the MySQL57–aas instance to full backup every Sunday at 12:11, and the incremental backup to 11:11 every day, with a default retention of 32 days:

$ psm MySQLCS update-backup-config -s MySQL57–aas -c /tmp/update-backup-payload.json 

where the payload for this command is:

{
    "defaultRetention":"32",
    "fullBackupSchedule":{
        "dayOfWeek":"Sun",
        "hour":"12",
        "minute":"11"
    },
    "incrementalBackupSchedule":{
        "dayOfWeek":"",
        "hour":"11",
        "minute":"11"
    },
    "backups":"ENABLE"
}