Restoring From a Backup

Use the Console or the command-line interface to restore from an already existing backup to a new DB system in the same 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 already 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 already backup to a new DB system:
  1. Open the navigation menu and select Databases. Under MySQL HeatWave, click Backups.
  2. Choose your compartment from the List scope.
  3. Do one of the following:
    • Choose the Restore to new DB system from the Actions menu on the same line as your backup.
    • Click the name of the backup to open the Backup details page and click Restore to new DB system.
    • 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.
  4. On the Restore to a new DB System panel, select Restore from a backup.
  5. Click Select backup.
  6. In the Browse all Backups panel, select the backup from the list of available backups, and click Select backup.
  7. 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.
  8. The type of DB System: Select Standalone for a single-instance DB system, and select High availability for a three-instance DB system.
  9. Configure networking:
    • Virtual cloud network: Select the VCN in which to launch the DB system.
    • Subnet: Select the required subnet of the selected VCN.
  10. Configure placement:
    • Availability domain: You can change the availability domain, but not the region.
    • Choose a fault domain: Choose this option to enable you to select a fault domain. If you do not choose a fault domain, Oracle chooses one for you. See Fault Domains.
  11. Configure hardware:
    • Select a shape: Click Change shape. In the Browse all shapes panel, do the following:
      1. Select the checkbox to choose the relevant shape. See Supported Shapes.
      2. Click Select a shape. If you want to use a shape which is smaller than the shape used by the parent DB system, ensure the selected shape defines resources appropriate to your DB system's resource requirements.
    • Data storage size (GB): Specify the amount of block storage, in GB, to allocate to the DB system. The value should be equal to or 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.
  12. Configure backup plan:
    • 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.
  13. Show advanced options: Click to open a group of tabs that enable you to further configure the DB system. See Advanced Options.
  14. 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

MySQL 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
  • High availability DB system with HeatWave
Supported
Standalone DB system with HeatWave
  • Standalone DB system
  • High availability DB system
Supported - Only InnoDB data is restored. If the source has Lakehouse enabled, the Lakehouse data is not restored.
Standalone DB system with HeatWave
  • Standalone DB system with HeatWave
  • High availability DB system with HeatWave
  • Supported - Only InnoDB data is restored. If the source has 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
  • High availability DB system with HeatWave
Supported
High availability DB system with HeatWave
  • Standalone DB system
  • High availability DB system
Supported - Only InnoDB data is restored. If the source has Lakehouse enabled, the Lakehouse data is not restored.
High availability DB system with HeatWave
  • Standalone DB system with HeatWave
  • High availability DB system with HeatWave
  • Supported - Only InnoDB data is restored. If the source has 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.