Restoring From a Backup

Use the Console or the command-line interface to restore from an existing backup to a new DB system in the same tenancy.

Note

The backup of a paid DB system cannot be restored to an Always Free DB system. The backup of an Always Free DB system can be restored to:
  • An Always Free DB system.
  • A payable DB system in a paid or trial tenancy.

You cannot create a DB system that has the same IP address as a running DB system. If you want to use the same IP address, delete the running DB system. Also, you can let Oracle select an unused IP address from the subnet or define a new IP address for the new DB system using the IP address field on the Networking tab of the Advanced options. See Advanced Option: Connections.

When you create a new DB system from a backup, it retains the administrator credentials of the original DB system. When you restore an automatic, manual, final or operator backup, you restore the complete data of the original DB system in the same tenancy.

Using the Console

Use the Console to restore from an existing backup to a new DB system.

Note

If you encounter OutOfHostCapacity work request error while creating a DB system from a backup, see Resolving OutOfHostCapacity Error.
Do the following to restore from an existing backup to a new DB system:
  1. Open the navigation menu and select Databases. Under HeatWave MySQL, click Backups.
  2. Select your compartment from the List scope.
  3. Do one of the following:
    • Select the Restore to new DB system from the Actions menu on the same line as your backup. The Restore to a new DB System panel is shown.
    • Click the name of the backup to open the Backup details page and click Restore to new DB system. The Restore to a new DB System panel is shown.
    • If the DB system has not been deleted, click the name of the DB system present on the same line as your backup to open the DB system details page. Click More actions and then click Restore to a new DB system. On the Restore to a new DB System panel, select Restore from a backup. Click Select backup. In the Browse all Backups panel, select the backup from the list of available backups, and click Select backup.
  4. Configure Source: The Always Free toggle switch is enabled when the selected backup is a backup of an Always Free DB system.
    • In a Free Tier tenancy, you can only restore an Always Free backup to an Always Free DB system.
    • In a paid or trial tenancy, you can disable the toggle switch to restore the Always Free backup to a paid DB system.
  5. Provide DB system information:
    • Create in compartment: If you want to launch the DB system in a compartment other than the current compartment, select the required compartment from the list. If you do not select a different compartment, the current compartment is used.
    • Name: (Optional) Specify a user-friendly display name for the DB system. The name does not need to be unique. An Oracle Cloud Identifier (OCID) uniquely identifies the DB system.
    • Description: (Optional) Specify a user-friendly description of the DB system and its purpose.
  6. The type of DB System: Select Standalone for a single-instance DB system, and select High availability for a three-instance DB system.
    Note

    High availability is not supported when restoring an Always Free backup to an Always Free DB system.
  7. Configure networking:
    • Virtual cloud network: Select the VCN in which to launch the DB system.
    • Subnet: Select the required subnet of the selected VCN.
  8. Configure placement:
    • Availability domain: You can change the availability domain, but not the region.
      Note

      The availability domain is not changeable when restoring an Always Free backup to an Always Free DB system.
    • Choose a fault domain: Select this option to enable you to choose a fault domain. If you do not choose a fault domain, Oracle chooses one for you. See Fault Domains.
  9. Configure hardware:
    • Enable HeatWave cluster: The default depends to the state of the DB system during the backup. You can change this option based on your requirements.
      Note

      When restoring a DB system combined with HeatWave cluster, you cannot upgrade to a newer version. If needed, you can upgrade the DB system and HeatWave cluster after the restore has completed.
    • Select a shape: Click Change shape. In the Browse all shapes panel, do the following:
      1. Select the compute model.
        • ECPU: Based on an architecture-agnostic of ECPU with an abstracted measure of CPU cores, memory, and other resources.
        • OCPU: Based on physical core of a processor with hyper-threading enabled. Filter the shapes by selecting the machine type:
          • All types: Displays all available shapes.
          • Virtual machine: Displays the Virtual Machine-based shapes only.
          • Bare metal: Displays the Bare Metal-based shapes only.
          Note

          All OCPU shapes are deprecated and are not available to new users created after Sept 5, 2024; existing users can still use them until Sept 5, 2025.
      2. Select the checkbox to choose a shape. See Supported Shapes.
      3. Click Select a shape.
      Note

      The shape is not changeable when restoring an Always Free backup to an Always Free DB system.
    • HeatWave cluster configuration: This option is shown when Enable HeatWave cluster is selected. If you want to change the default configuration, click Configure HeatWave cluster and do the following in the Configure HeatWave cluster panel:
      Note

      The shape and number of nodes are not changeable when restoring an Always Free backup to an Always Free DB system.
      1. Shape details: The shape for the HeatWave nodes. If you want to change the shape, click Change shape to select a shape for the HeatWave nodes. See Supported Shapes.
      2. Node: Specify the number of HeatWave nodes to create. The minimum is 1 node and the maximum depends to the following:
        • HeatWave.Free shape: 1 node
        • HeatWave.32GB shape: 16 nodes
        • HeatWave.512GB or MySQL.HeatWave.VM.Standard shape: 64 nodes
        • HeatWave.512GB or MySQL.HeatWave.VM.Standard shape with Lakehouse enabled: 512 nodes
      3. HeatWave Lakehouse: Enable query processing on the data residing in Object Storage. Prior to MySQL 8.4.0-u3, HeatWave Lakehouse is supported on the MySQL.HeatWave.VM.Standard and HeatWave.512GB shapes only. See HeatWave Lakehouse.
        Note

        Prior to MySQL 8.3.0-u2, you must disable point-in-time recovery, high availability, read replicas, and outbound replication in order to enable HeatWave Lakehouse.
      4. Click Save changes.
    • Storage size: Configure the storage size of the DB system. The data storage size is independent of the shape you select.
      • Initial data storage size (GB): Specify the initial data storage size, in GB, to allocate to the DB system. The value should be greater than 50 and less than 131072.

        The initial storage value has an impact on your ability to increase the storage size later and the performance of the increased storage. See DB System Storage. Also, if you are importing data, ensure you specify sufficient data storage.

      • Automatic storage expansion: Enable automatic data storage expansion when space usage grows near to the database instance Health Monitor read-only limits for any instance in the DB system.
        Note

        Automatic storage expansion is enabled by default when high availability is enabled, and it cannot be disabled.
      • Maximum data storage size (GB): Specify the maximum data storage size, in GB, to which the storage size can be expanded. The value must be greater than the initial data storage size.
        Note

        Whenever the storage size is expanded, the billing for storage usage will increase accordingly. Use the maximum storage size to prevent cost overrun.
  10. Configure backup plan:
    Note

    When restoring an Always Free backup to an Always Free DB system, automatic backup is enabled with 1-day retention period, point-in-time recovery is not supported, and the backup window is not changeable.
    • Enable automatic backups: Select the option to enable automatic backups. If you do not select automatic backups, manage your backups manually. It is recommended to enable automatic backups.
    • Backup retention period: (Optional) Specify how may days you want to retain the backup. By default, the DB system retains the backup for seven days.
    • Enable point-in-time restore: Select the option to enable you to restore a DB system at a point-in-time to a new DB system.
    • Select backup window: Select the option to enable you to select the backup window start time.
    • Window start time: Specify the time (in UTC timezone) when you want to start the backup of your DB system. Your backup starts within 30 minutes following the window start time.
    • Show backup windows per region: Click to see the default window start time of your region.
  11. Provide contacts for operational notifications and announcements: (Optional) Enter one or more contact emails to receive operational notices and announcements as well as unplanned maintenance notifications. Click Add contact to add more contacts. You can add up to a maximum of 10 contacts. Duplicate and invalid email addresses are not allowed.
  12. Show advanced options: Click to open a group of tabs that enable you to further configure the DB system. See Advanced Options.
  13. Click Restore.

Using the CLI

Use the command-line interface to restore from a backup to a new DB system.

This task requires the following:
  • A compartment, subnet, and backup OCID.
  • The name of the availability domain.
  • The administrator username and password for the parent DB system of the backup.
  • A policy that permits you to create DB system in the compartment or tenancy.
  • A properly configured CLI installation and the requisite SSH keys. See Command Line Interface.
  • A properly configured VCN. See Creating a Virtual Cloud Network.
Do the following to create a DB system from a backup:
  1. Open a command prompt and run the following:
    oci mysql db-system clone 
    --compartment-id <CompartmentOCID> 
    --availability-domain <AvailabilityDomain> 
    --admin-username <Username> 
    --admin-password <Password> 
    --shape-name <ShapeName>  
    --source-backup-id <SourceBackupOCID>
    --subnet-id <SubnetOCID> 
    --data-storage-size-in-gbs <Number> 
    --display-name <Displayname>
    • admin-username: Specify the administrator username for the parent DB system of the backup.
    • admin-password: Specify the administrator password for the parent DB system of the backup.
    • compartment-id: Specify the OCID of the compartment in which the DB system is created.
    • availability-domain: Specify the name of the availability domain in which the DB system is created.
    • configuration-id: (Optional) Specify the OCID of the configuration to apply to the DB system. If you do not define a configuration OCID, the default configuration associated with the selected shape is used. If you define a custom configuration, it must use the same shape as defined in the request.
    • shape-name: Specify a shape greater than the shape used by the parent DB system of the backup. For example, MySQL.VM.Standard.E3.2.32GB.
    • source-backup-id: Specify the OCID of the backup.
    • subnet-id: Specify the OCID of the VCN subnet the DB system should use.
    • data-storage-size-in-gbs: (Optional) Specify the amount of data storage, in GBs, for the DB system. The value should be greater than the amount of storage defined on the DB system of the backup, and smaller than 131,072. The data storage size is independent of the shape you select. If you do not define a value, the storage defined on the DB system of the backup is used.
    • display-name: (Optional) Specify the display name of the DB system. If you do not define a display name, one is generated for you in the format mysqldbsystemYYYYMMDDHHMMSS.

Related Topics

Supported Backup Restore Scenarios

HeatWave Service supports restoring a backup of a standalone or high availability DB system to a new DB system.

When you restore from standalone DB system to a high availability DB system, ensure the following:

  • Primary keys exist on every table in the DB system.
  • MySQL version is 8.0.24 or higher. You cannot enable high availability on earlier versions of MySQL.

Table 9-2 Supported Backup Restore Scenarios

Source Target Support
Standalone DB system
  • Standalone DB system
  • High availability DB system
  • Standalone DB system with HeatWave cluster
  • High availability DB system with HeatWave cluster
Supported
Standalone DB system with HeatWave cluster
  • Standalone DB system
  • High availability DB system
Supported - Only InnoDB data is restored. If the source has HeatWave Lakehouse enabled, the Lakehouse data is not restored.
Standalone DB system with HeatWave cluster
  • Standalone DB system with HeatWave cluster
  • High availability DB system with HeatWave cluster
  • Supported - Only InnoDB data is restored. If the source has HeatWave Lakehouse enabled, the Lakehouse data is not restored.
  • If you add a HeatWave cluster to the standalone or high availability DB system later, data is automatically not loaded in the HeatWave cluster, and you need to load it manually.
High availability DB system
  • Standalone DB system
  • High availability DB system
  • Standalone DB system with HeatWave cluster
  • High availability DB system with HeatWave cluster
Supported
High availability DB system with HeatWave cluster
  • Standalone DB system
  • High availability DB system
Supported - Only InnoDB data is restored. If the source has HeatWave Lakehouse enabled, the Lakehouse data is not restored.
High availability DB system with HeatWave cluster
  • Standalone DB system with HeatWave cluster
  • High availability DB system with HeatWave cluster
  • Supported - Only InnoDB data is restored. If the source has HeatWave Lakehouse enabled, the Lakehouse data is not restored.
  • If you add a HeatWave cluster to the standalone or high availability DB system later, data is automatically not loaded in the HeatWave cluster, and you need to load it manually.