psm dbcs recover

Perform a recovery from backup on an Oracle Database Classic Cloud Service instance.

Syntax

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

psm dbcs recover
  -s|--service-name instance-name
  -c|--config-payload json-file
  [-of|--output-format json|html|short]

Parameters

Parameter Description

-s|--service-name instance-name

Specifies the name of the Database Classic Cloud Service instance on which you want to perform the recovery operation.

-c|--config-payload json-file

Specifies the path to a JSON file containing the information necessary to perform the recovery operation. The format of this file is the same as the request body you provide when adding an access rule by using the REST API. For information about this format, see the “Body” section of Start a Recovery Operation in REST API for Oracle Database Classic Cloud Service.

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

Examples

The following example performs a recovery from backup as specified by information provided in the recover.json file on the db12c-xp-si2 Database Classic Cloud Service instance.

$ psm dbcs recover --service-name db12c-xp-si2 --config-payload recover.json
"Accepted"
Job ID : 5858793

Listing of recover.json

{
  "tag" : "TAG20160719T230330"
}

Here is the information about job 5858793 upon successful completion of the operation:

$ psm dbcs operation-status --job-id 5858793
{
    "activityLogId":3654208,
    "serviceName":"db12c-xp-si2",
    "serviceType":"dbaas",
    "identityDomain":"usexample",
    "serviceId":141969,
    "jobId":5858793,
    "startDate":"2016-07-27T21:42:27.919+0000",
    "endDate":"2016-07-27T21:49:39.042+0000",
    "status":"SUCCEED",
    "operationId":141969,
    "operationType":"RECOVER",
    "summaryMessage":"RECOVER",
    "authDomain":"usexample",
    "authUser":"dbaasadmin",
    "initiatedBy":"USER",
    "messages":[
        {
            "activityDate":"2016-07-27T21:42:27.919+0000",
            "message":"Activity Submitted"
        },
        {
            "activityDate":"2016-07-27T21:42:27.965+0000",
            "message":"Activity Started"
        },
        {
            "activityDate":"2016-07-27T21:42:30.114+0000",
            "message":"Recovery-Status [RECOVERY_IN_PROGRESS]"
        },
        {
            "activityDate":"2016-07-27T21:42:30.114+0000",
            "message":"Recovery of database done using tag:[TAG20160719T230330]"
        },
        {
            "activityDate":"2016-07-27T21:49:39.027+0000",
            "message":"Recovery-Status [RECOVERY_COMPLETED]"
        },
        {
            "activityDate":"2016-07-27T21:49:39.042+0000",
            "message":"Activity Ended"
        }
    ]
}