Scheduling Backups of Storage Volumes and Restoring from Backups
This topic does not apply to Oracle Cloud at Customer.
When you schedule a backup of a storage volume, you can also specify the number of backups to retain. For example, you can specify that a given storage volume should be backed up at hourly intervals and the two most recent completed snapshots of the storage volume should be retained. This enables you to always have your most current data backed up, without creating unnecessary copies of your data. After a snapshot is completed, if required you can restore a storage volume using the snapshot. The time taken to back up or restore storage volumes depends on the size of the storage volume.
Creating a Backup Schedule
This topic does not apply to Oracle Cloud at Customer.
When you schedule a backup of a storage volume that’s attached to an instance, all data that has been written to the storage volume is captured in the backup. However, data that’s cached by an application or by the operating system is excluded from the backup.
When you create a backup schedule for the bootable storage volume of an instance, consider the steps you can take to ensure that data writes have been completed and no further modifications are made to the volume while the scheduled backup is being created. For example, you can use tools or utilities provided by the OS to pause modifications. Alternatively, when feasible, you can unmount the storage volume that you want to back up or delete the instance and re-create it later.
To schedule the backup of a storage volume:Prerequisites
-
When you create a backup schedule, snapshots of the specified storage volume are created according to the specified schedule. These snapshots are stored in the associated Oracle Cloud Infrastructure Object Storage Classic instance. Ensure that you’ve set a replication policy for your Oracle Cloud Infrastructure Object Storage Classic instance. See Selecting a Replication Policy for Oracle Cloud Infrastructure Object Storage Classic in Using Oracle Cloud Infrastructure Object Storage Classic.
-
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.
Procedure
To create a backup schedule for a storage volume using the CLI, use the opc compute backup-configuration add
command. For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To create a backup schedule for a storage volume using the API, use the POST /backupservice/v1/configuration
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
After creating a backup schedule, you can view the storage volume snapshots created by scheduled backups on the Storage Snapshots page. See Listing Backups.
To restore a storage volume from a snapshot created by a scheduled backup, see Restoring a Storage Volume from a Backup.
Listing Backup Schedules
This topic does not apply to Oracle Cloud at Customer.
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.
To list backup schedules using the CLI, use the opc compute backup-configuration list
command. For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To list backup schedules using the API, use the GET /backupservice/v1/configuration/
method. To retrieve the details of a specific schedule using the API, use the GET /backupservice/v1/configuration/name
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
To update a backup schedule, see Updating a Backup Schedule.
To delete a backup schedule, see Deleting a Backup Schedule.
Updating a Backup Schedule
This topic does not apply to Oracle Cloud at Customer.
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.
To update a backup schedule for a storage volume using the CLI, use the opc compute backup-configuration update
command. For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To update a backup schedule using the API, use the PUT /backupservice/v1/configuration/name
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
If you no longer need a backup schedule, you can delete the schedule. See Deleting a Backup Schedule.
To view the storage volume snapshots created by the backup schedule, see Listing Backups.
Deleting a Backup Schedule
This topic does not apply to Oracle Cloud at Customer.
Prerequisites
-
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. -
To delete a backup schedule, you must delete all backups and restores created from that schedule.
Procedure
To delete a backup schedule for a storage volume using the CLI, use the opc compute backup-configuration delete
command. For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To delete a backup schedule for a storage volume using the API, use the DELETE /backupservice/v1/configuration/name
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
Listing Backups
This topic does not apply to Oracle Cloud at Customer.
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.
The Storage Snapshots page displays a list of storage volume snapshots, which includes colocated snapshots, remote snapshots, and the remote snapshots created by scheduled backups. Snapshots are arranged alphabetically by the name of the storage volume that each snapshot is of. If there are multiple snapshots of a storage volume, the most recent snapshot is at the top.
Tip:
You can filter the list of backups according to their category. To view storage volumes of a specific category (such as IaaS, PaaS, or Personal), click the Category menu and select the appropriate filter. Click the Show menu and select the remote filter to view all the backups along with the remote snapshots.
The Storage Snapshots page also displays other information about your storage volume snapshots and scheduled backups, such as the date each snapshot was created, the volumes restored from a snapshot, if any, and the backup schedule associated with a snapshot.
The icon associated with each snapshot listed on this page indicates whether a backup is a colocated or a remote snapshot and also shows the status of the backup. While a snapshot is being created, the status shows Initializing.
When a backup is completed, its status changes to Completed, and you can perform actions like restoring a storage volume or deleting the backup.
To list the backups using the CLI, use the opc compute backup list
command. For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To list snapshots created by scheduled backups using the API, use the GET /backupservice/v1/backup
method. To view the details of a specific backup using the API, use the GET /backupservice/v1/backup/name
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
Note:
The Storage Snapshots page displays snapshots created by using scheduled backups as well as snapshots created by using the Create Snapshot option.
To delete a backup, see Deleting a Backup.
After a backup is created from a schedule, to use this backup to restore a storage volume, see Restoring a Storage Volume from a Backup.
Restoring a Storage Volume from a Backup
This topic does not apply to Oracle Cloud at Customer.
Prerequisites
-
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. -
You should have already created a scheduled backup of the storage volume that you want to restore. See Creating a Backup Schedule.
Procedure
To restore a storage volume from a scheduled backup using the CLI, use the opc compute restore add
command. For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To restore a storage volume from a scheduled backup using the API, use the POST /backupservice/v1/restore
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
Note:
You can use the POST /backupservice/v1/restore
method to restore a storage volume from a snapshot that was created by using the POST /backupservice/v1/configuration
method or the POST /backupservice/v1/backup
method only. If you’ve created snapshots by using the POST /storage/snapshot/
method, you can restore a volume from those snapshots by using the POST /storage/volume
method. You can’t restore a storage volume from those snapshots by using the POST /backupservice/v1/restore
method.
After you’ve restored a storage volume, to view details of your storage volume, see Viewing Details of a Storage Volume.
Deleting a Backup
This topic does not apply to Oracle Cloud at Customer.
Deleting a specific backup has no impact on the backup schedule. The next backup will be created as scheduled. There’s also no impact on storage volumes that might have already been created using the backup that you want to delete.
Prerequisites
-
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.
Note:
You should always use your orchestrations to manage resources that you’ve created using orchestrations. Don’t, for example, use the web console or the CLI or REST API to delete an object that you created using an orchestration. This could cause your orchestration to either attempt to re-create the object and associated resources, or to go into an error state.
If you created the object using orchestration v1, then you can delete the object by terminating the orchestration. See Terminating an Orchestration v1.
If you created the object using an orchestration v2, then you can delete the object by suspending, terminating, or updating the orchestration. See Suspending an Orchestration v2, Terminating an Orchestration v2, or Updating an Orchestration v2.
To delete a backup of a storage volume using the CLI, use the opc compute backup delete
command. For help with that command, run the command with the -h
option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.
To delete a backup of a storage volume using the API, use the DELETE /backupservice/v1/backup/name
method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.
Note:
You can use the DELETE /backupservice/v1/backup
method to delete a backup that was created using the POST /backupservice/v1/configuration
method or the POST /backupservice/v1/backup
method only. If you’ve created snapshots by using the POST /storage/snapshot/
method, you can delete those snapshots by using the DELETE /storage/snapshot
method.