Thursday, March 14, 2024

MySQL: Move MySQL OCI DB System to Different Compartment

 

- Overview:

  • There is no option on OCI console to move MySQL DB system to different compartment.
  • The only option, which is available at the time of writing this blog, is to create a new DB system in different compartment by restoring the backup of the original MySQL DB system. 
  • There are three types of MySQL DB system backups to restore from.
    •  Automatic Backup.
    • Manual Backup.
    • Operator Backup.
  • 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, or operator backup, you restore the complete data of the original 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 original running DB system. 

In this blog, I'll demonstrate the steps to create new MySQL DB system by restoring from the backup of another running DB system using OCI console. 

 - Prerequisites:

  • An Oracle cloud fee trial or paid account.
  • An existing MySQL DB system.  
  • An existing manual or Automatic backup for the MySQL DB system.

Steps Restoring From a Backup

1. Sign in to the OCI console.
2. Open the navigation menu and navigate to "Databases -> DB Systems".


3. Choose your compartment. The list of MySQL DB system is displayed. Click your DB system name.


4. Choose the "Restore to new DB system" from the Actions menu.















5. On the "Restore to a new DB System" panel, there are two options to restore from: 
- Restore from DB system at a point-in-time












- Restore from a backup
 In our example, select "Restore from a backup" and click "Select backup".











6. On the "Browse all Backups" panel, select the backup from the list of available backups, and click "Select backup". I'll use the manual backup, which was taken previously.





























7. On "Provide DB system information" panel, provide the information of new DB system.
- Compartment: make sure to select the right target compartment.
- DB system name.
















- DB system type: Select Standalone for a single-instance DB system, and select High availability for a three-instance DB system.
- Configure networking: select VCN and private subnet.





















- Select a shape: you can select a different shape other than the shape of the original running DB system.
- Define Data storage size: should be equal or greater than the storage size of the original running DB system.





















- Configure backup plan.






















8. Finally, click "Restore".

9. On DB system details home page and under General information section, it will show in the description "Restored from backup".



















Now, you have a new standalone DB system, which has the complete data of the original DB system in different compartment.


No comments:

Post a Comment

Oracle 23ai: Hybrid Read-Only Mode for Pluggable Databases

  - Overview: Oracle 23ai database introduces a new feature to open Pluggable database in  a new mode called hybrid read-only. Hybrid read-o...