psm jcs delete-backup

This command deletes a backup of an Oracle Java Cloud Service instance.

Syntax

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

psm jcs delete-backup -s|--service-name serviceName 
   -b|--backup-id backupId 
   [-f|--force true|false] 
   [-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.
-b|--backup-id backupId ID of the backup that you want to delete. To retrieve the backup ID, use the view-backups command.
-f|--force true|false (Optional) When set to true, forces a backup created by the patching process to be deleted.
-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

Example

$ psm jcs delete-backup -s Example1Instance -b 1461867758288 -of json
{    
    "job_id":"34325",
    "operationName":"delete-backup",
    "target_uri":"http://myserver.us.mycorp.com:7103/paas/service/jcs/api/v1.1/instances/myteamabca/Example1Instance/deletedbackups/34325"
}
Job ID : 34325

Note that this command returned a job ID. To see the status of your delete-backup operation, use this ID with the psm jcs operation-status command:

$ psm jcs operation-status -j 34325 -of json

When you see the message:

   "operationId":364,
   "operationType":"DELETE_BACKUP",
   "serviceId":364,
   "serviceName":"Example1Instance",
   "serviceType":"jaas",
   "startDate":"2016-04-28T20:01:58.024+0000",
   "status":"SUCCEED",
   "summaryMessage":"DELETE_BACKUP"

the backup was successfully deleted.