Restoring From a Backup

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

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: Networking.

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.

Using the Console

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

Do the following to restore from an already backup to a new DB system:
  1. Open the navigation menu and select Databases. Under MySQL, 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: You cannot change the type of the DB system when restoring from a backup. For example, if the original DB system was Standalone, your new DB system will also be Standalone.
  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 greater than 50 and less than 65536.
      Note

      The storage value has an impact on your ability to update storage later. See Using the Console. Also, if you are importing data, ensure you specify sufficient data storage.
  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 your 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 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 parent DB system backup, and smaller than 65536. Also, ensure you define enough storage to accommodate imported data. If you do not define a value, the value used by the parent 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

Restoring Support

MySQL Database Service supports restoring from various backups.

You can restore the following:

  • A standalone backup to a standalone DB system.
  • A standalone backup to a HeatWave enabled DB system. To restore a standalone backup to a HeatWave enabled DB system, first restore the backup to a standalone DB system that supports HeatWave, and then enable HeatWave.
  • A high availability backup to a standalone DB system.
  • A high availability backup to a high availability DB system.
  • A high availability backup to a HeatWave enabled DB system. To restore a high availability backup to a HeatWave enabled DB system, first restore the backup to a standalone DB system that supports HeatWave, and then enable HeatWave.
  • A HeatWave enabled backup to a standalone DB system.
  • A HeatWave enabled backup to a HeatWave enabled DB system. To restore a HeatWave enabled backup to a HeatWave enabled DB system, first restore the backup to a standalone DB system that supports HeatWave, and then enable HeatWave.

You cannot restore the following:

Note

A workaround in the following cases is to restore the backup to a standalone DB system, then enable high availability for that DB system. However, the data in the backup must meet the requirements for a high availability system, otherwise high availability cannot be enabled.
  • A standalone backup to a high availability DB system.
  • A HeatWave enabled backup to a high availability DB system.