Scheduling Backups of Storage Volumes and Restoring from Backups

Not Oracle Cloud at Customer This topic does not apply to Oracle Cloud at Customer.

You can create a schedule to back up a storage volume automatically at defined intervals. Scheduling a backup creates snapshots of the specified storage volume at the specified intervals of time. These snapshots are stored in the associated Oracle Cloud Infrastructure Object Storage Classic instance.

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

Not Oracle Cloud at Customer This topic does not apply to Oracle Cloud at Customer.

A backup schedule allows you to specify the periodicity of backups and the number of backups to retain.

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

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Storage tab.
    The Storage Volumes page is displayed.
  3. Go to the storage volume that you want to create a backup schedule for. From the menu icon menu, select Schedule Snapshots.
  4. In the Create Snapshot Schedule dialog box, select or enter the following information:
    • Name: Enter a name for the schedule.
    • Enable: Select this option if you want to start creating backups. Otherwise, don't select this option. You can enable the backup schedule later by updating the schedule.
    • Retention Count: Specify the number of backups to retain. Whenever a backup is completed, the most recent backups are retained and the oldest backup is deleted.
    • Interval: Specify the frequency at which you want to create backups.
    • Every:
      • If you selected the hourly interval for the backup schedule, specify the number of hours after which each successive backup must be taken. Select a number between 1 and 24.

      • If you selected the weekly interval for the backup schedule, specify the day of the week when you want to create each successive backup.

    • At: If you selected the weekly interval, specify the time when you want to create each successive backup.
    • Description: Enter a meaningful description, to help you identify the intended purpose of this backup schedule.
  5. Click Schedule.
    A backup schedule is created and if the schedule is enabled, the specified storage volume is backed up as per the schedule.

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

Not Oracle Cloud at Customer This topic does not apply to Oracle Cloud at Customer.

Backup schedules allow you to generate multiple backups of a storage volume at defined intervals. You can configure backup schedules to retain a specified number of backups of storage volumes. After you’ve created backup schedules, you can see the list of schedules and view information about each schedule on the Snapshot Schedules page.

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.

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Storage tab.
    The Storage Volumes page is displayed.
  3. Click the Snapshot Schedules tab in the left pane.

    The Snapshot Schedules page displays a list of schedules. The icon associated with each schedule listed on this page indicates whether the schedule is enabled.

    The Snapshot Schedules page also displays other information about your backup schedules, including the storage volume for which the backup schedule was created, the number of backups that will be retained, and the intervals at which the volume is backed up.

    Tip:

    You can filter the list of backup schedules according to their category. To view backup schedules of a specific category (such as IaaS, PaaS, or Personal), click the Category menu and select the appropriate filter. You can also filter schedules according to the status of the schedule. To view enabled or disabled backup schedules, click the Show menu and select the appropriate filter.

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

Not Oracle Cloud at Customer This topic does not apply to Oracle Cloud at Customer.

After you’ve created a backup schedule for a storage volume, if required, you can update the schedule to change the frequency of backups or the number of backups that you want to retain. You can also enable or disable a backup schedule.

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.

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Storage tab.
    The Storage Volumes page is displayed.
  3. Click the Snapshot Schedules tab in the left pane.
    The Snapshot Schedules page displays the list of backup schedules.
  4. Go to the backup schedule that you want to update, and from the menu icon menu, select Update.
  5. In the Update Snapshot Schedule dialog box, update any of the following:
    • Enable: Enable or disable scheduled backups. If you enable a backup schedule that you'd created and disabled earlier, and if the next scheduled backup would have occurred in the past, the backup will start right away.
    • Retention Count: Update the number of backups to retain.
    • Interval: Update the schedule for creating backups.
    • Every:
      • If you selected the hourly interval for the backup schedule, specify the number of hours after which each successive backup must be taken. Select a number between 1 and 24.

      • If you selected the weekly interval for the backup schedule, specify the day of the week when you want to create each successive backup.

    • At: If you selected the weekly interval, click the clock icon. Specify the time when you want to create each successive backup.
    • Description: Enter a meaningful description, to help you identify the intended purpose of this backup schedule.
  6. Click Update.
    The backup schedule is updated.

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

Not Oracle Cloud at Customer This topic does not apply to Oracle Cloud at Customer.

If you no longer need scheduled backups of a storage volume, you can delete a backup schedule.

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

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Storage tab.
    The Storage Volumes page is displayed.
  3. Click the Snapshot Schedules tab in the left pane.
    The Snapshot Schedules page displays the list of backup schedules.
  4. Go to the backup schedule that you want to delete, and from the menu icon menu, select Delete.
The backup schedule is deleted and no further scheduled backups are generated.

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

Not Oracle Cloud at Customer This topic does not apply to Oracle Cloud at Customer.

When you back up a storage volume using scheduled backups, a remote snapshot is created for each backup. These snapshots are stored in the associated Oracle Cloud Infrastructure Object Storage Classic instance. You can view the snapshots created by a scheduled backup on the Storage Snapshots page.

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.

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Storage tab.
    The Storage Volumes page is displayed.
  3. In the Storage drop-down list, click Storage Snapshots.

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

Not Oracle Cloud at Customer This topic does not apply to Oracle Cloud at Customer.

When you back up a storage volume using scheduled backups, a remote snapshot is created for each backup. 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.

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

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Storage tab.
    The Storage Volumes page is displayed.
  3. In the Storage drop-down list, click Storage Snapshots.
    The Storage Snapshots page displays a list of storage volume snapshots as well as the name of the storage volume that each snapshot was created from. For snapshots created by using scheduled backups, this page also displays the name of the backup schedule.
  4. Go to the backup that you want to restore a storage volume from. From the menu icon menu, select Restore Volume.
  5. In the Restore Storage Volume dialog box, enter a name for the new storage volume, specify a description if required and click Restore.
While the storage volume is being created, the status on the Storage Volume page shows Initializing. After the storage volume has been restored, its status changes to Online.

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

Not Oracle Cloud at Customer This topic does not apply to Oracle Cloud at Customer.

If you no longer require a backup of a storage volume, you can delete the backup. This is useful if, for example, the data on that backup is redundant or obsolete or if creating a new volume from that backup isn’t required.

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.

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Storage tab.
    The Storage Volumes page is displayed.
  3. In the Storage drop-down list, click Storage Snapshots.
    The Storage Snapshots page displays the list of backups and snapshots.
  4. Go to the backup that you want to delete, and from the menu icon menu, select Delete.
    The snapshot is deleted.

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.