psm jcs update-backup-config

Use this command to update the backup configuration of an Oracle Java Cloud Service instance.

You can update the following details:
  • Schedule for full and incremental backups

  • Default retention time for incremental backups and full on-demand backups; note that full scheduled backups are retained until their last related incremental backup is no longer available, if any

  • URI and user name for the object storage container or bucket that is used to store backups

Syntax

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

psm jcs update-backup-config -s|--service-name ServiceName 
      [-c|--config-param pathToJson]
      [-of|-–output-format json|html|short]
      [-wc|--wait-until-complete true|false] 

Parameters

All parameters are required unless otherwise noted.

Parameter Description
-s|--service-name ServiceName Name of the Oracle Java Cloud Service instance.
-c|--config-param pathToJson Specifies the path to the JSON file containing the information necessary to update the backup configuration of a Java Cloud Service instance. The format of this file, as shown in Payload Example, is the same as the request body you provide when updating the backup configuration of a Java Cloud Service instance by using the REST API. For information see the Request/Body (backupconfig-postrequest) section of Update the Backup Configuration in the REST API for Oracle Java Cloud Service.
-of|-–output-format json|html|short (Optional) Output format of the command’s response:

Accepted values: json, html, short

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

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

(Optional) A boolean value that, when set to true, makes the command behave 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)
Default: false

Payload Example

Note:

For payload parameter descriptions, see the Request/Body (backupconfig-postrequest) section of Update the Backup Configuration in the REST API for Oracle Java Cloud Service.

This payload changes the automatic backup schedule. It includes only those parameters that need to be changed.

{
   "fullBackupSchedule":
   {
      "hour":"5",
      "dayOfWeek":"Sun"
   },
   "incrementalBackupSchedule":
   {
      "hour":"3"
   }
}

To disable a scheduled full or incremental backup, set the fullBackupSchedule or incrementalBackupSchedule value, respectively, to null. For example:

{
   "fullBackupSchedule": null
}

Note:

You cannot change the backup configuration when the backup service for the specified service instance is in a DISABLED state.

To disable and re-enable the backup service for a service instance, use the backups parameter. When disabled, both on-demand and scheduled automated backups cannot be performed.

This payload disables the backup service for the specified service instance. Note that the request payload should not include other parameters as supported in the backup configuration because you are disabling the backup service.
{
    "backups": "DISABLE"
}
This sample enables the backup service for the service instance specified by the -s command-line parameter.
{
    "backups": "ENABLE"
}
Note that the request payload can include other parameters as supported in the backup configuration when you re-enable the backup service.

Example

$ psm jcs update-backup-config -s Example1Instance -c c://home/templates/backup-config-payload.json -of json
{
    "backupDestination":"BOTH",
    "cloudStorageContainer":"Storage-StorageEval01admin/JaaSBackup",
    "cloudStorageUser":"Storageadmin",
    "defaultRetention":"40 days",
    "fullBackupSchedule":{
        "dayOfMonth":"*",
        "dayOfWeek":"Sun",
        "hour":"5",
        "minute":"0",
        "month":"*",
        "second":"0",
        "year":"*"
    },
    "incrementalBackupSchedule":{
        "dayOfMonth":"*",
        "dayOfWeek":"Mon,Tue,Wed,Thu,Fri,Sat",
        "hour":"3",
        "minute":"0",
        "month":"*",
        "second":"0",
        "year":"*"
    },
    "lastBackupDate":"Thu Apr 28 18:22:38 GMT 2016",
    "nextFullBackupDate":"Sun May 01 05:00:00 GMT 2016",
    "nextIncrementalBackupDate":"Fri Apr 29 03:00:00 GMT 2016",
    "percentBackupVolumeUsed":0.0033531999215483665,
    "totalBackupVolumeUsed":"6.9MB",
    "totalBackupVolumeUsedInBytes":7200942,
    "totalCloudStorageContainerUsed":"6.9MB",
    "totalCloudStorageContainerUsedInBytes":7200942
}