30 Restore
This topic does not apply to Oracle Cloud at Customer.
Before running the CLI commands described in this section, make sure that you've installed the CLI client and set up the required environment variables as described in Preparing to Use the CLI.
Commands
restore add
This topic does not apply to Oracle Cloud at Customer.
Restores a storage volume from a previously completed backup.
When you back up a storage volume using the backup add command, a snapshot of the storage volume is created. These snapshots are stored in the associated Oracle Cloud Infrastructure Object Storage Classic instance. At any time, if required, you can use these backups to restore a storage volume.
You can restore a storage volume from a backup that is in the COMPELETED
state. Before running this command, verify that the state
field value of the backup you want to restore is COMPLETED
by retrieving details of the backup and checking the state
field. See backup get.
Required Role
To complete this task, you must have the Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute restore add backup_name volume_uri [--description description] [--name restore_name]
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc -f json compute restore add /Compute-acme/jack.jones@example.com/vol1-BACKUP-A /storage/volume/Compute-acme/jack.jones@example.com/restored-example-volume --description 'restore of storage volume vol1' --name /Compute-acme/jack.jones@example.com/vol1-RESTORE-A
Sample Output
{ "backupConfigurationName": "/Compute-acme/jack.jones@example.com/backupConfigVol1", "backupName": "/Compute-acme/jack.jones@example.com/vol1-BACKUP-A", "bootable": false, "description": "restore of storage volume vol1", "detailedErrorMessage": "", "errorMessage": "", "name": "/Compute-acme/jack.jones@example.com/vol1-RESTORE-A", "runAsUser": "/Compute-acme/jack.jones@example.com", "state": "SUBMITTED", "tagId": "170158d5-470a-4ee1-a50e-c2aed5bbdebc", "uri": "https://api-z999.compute.us0.oraclecloud.com:443/backupservice/v1/restore/Compute-acme/jack.jones@example.com/vol1-RESTORE-A", "volumeUri": "/storage/volume/Compute-acme/jack.jones@example.com/restored-example-volume" }
Check the state
field to identify if the storage volume has been restored. When you create a restore, the status
field value is SUBMITTED
. Run the restore get command to monitor the value of the status
field. Restoring a storage volume from a backup can take quite a long time depending on the size of the storage volume. When the state
of the restore object changes to COMPLETED
, it indicates that a storage volume has been created with the specified name.
restore list
This topic does not apply to Oracle Cloud at Customer.
Retrieves details of all the restore objects in the specified container.
Required Role
To complete this task, you must have the Compute_Monitor
or Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute restore list [--backup-configuration-name backup-configuration-name]
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc -f json compute restore list /Compute-acme/jack.jones@example.com
Sample Output
[ { "backupConfigurationName": "/Compute-acme/jack.jones@example.com/backupConfigVol1", "backupName": "/Compute-acme/jack.jones@example.com/vol1-BACKUP-A", "bootable": false, "description": "restore of vol1", "detailedErrorMessage": "", "errorMessage": "", "name": "/Compute-acme/jack.jones@example.com/vol1-RESTORE-A", "runAsUser": "/Compute-acme/jack.jones@example.com", "state": "COMPLETED", "tagId": "170158d5-470a-4ee1-a50e-c2aed5bbdebc", "uri": "https://api-z999.compute.us0.oraclecloud.com:443/backupservice/v1/restore/Compute-acme/jack.jones@example.com/vol1-RESTORE-A", "volumeUri": "/storage/volume/Compute-acme/jack.jones@example.com/restored-example-volume" } ]
restore get
This topic does not apply to Oracle Cloud at Customer.
Retrieves details of the specified restore object.
You can use the get
command to verify whether add
operation was completed successfully. Use the -F
option (for example, -F name,state
) to filter the output for specific attributes.
Required Role
To complete this task, you must have the Compute_Monitor
or Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute restore get name
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc -f json compute restore get /Compute-acme/jack.jones@example.com/vol1-RESTORE-A
Sample Output
{ "backupConfigurationName": "/Compute-acme/jack.jones@example.com/backupConfigVol1", "backupName": "/Compute-acme/jack.jones@example.com/vol1-BACKUP-A", "bootable": false, "description": "restore of volSK", "detailedErrorMessage": "", "errorMessage": "", "name": "/Compute-acme/jack.jones@example.com/vol1-RESTORE-A", "runAsUser": "/Compute-acme/jack.jones@example.com", "state": "COMPLETED", "tagId": "170158d5-470a-4ee1-a50e-c2aed5bbdebc", "uri": "https://api-z999.compute.us0.oraclecloud.com:443/backupservice/v1/restore/Compute-acme/jack.jones@example.com/vol1-RESTORE-A", "volumeUri": "/storage/volume/Compute-acme/jack.jones@example.com/restored-example-volume" }
restore delete
This topic does not apply to Oracle Cloud at Customer.
Deletes the specified restore object. This command does not delete the restored storage volume that is created when you run the restore add command. No response is returned.
You can delete a restore only when the state
field value of the restore is COMPLETED
.
Required Role
To complete this task, you must have the Compute_Operations
role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Syntax
opc compute restore delete name
For help with the parameters and options of this command, run the command with the -h
option.
Example
opc compute restore delete /Compute-acme/jack.jones@example.com/vol1-RESTORE-A