Creating a DB System Clone
When you create a clone from an existing DB system, a new DB system is created by copying the source DB system data to the new DB system.
Cloning creates a new DB system directly from an existing source DB system instead of using a DB system backup as the source. The new DB system retains the administrator credentials of the source DB system. You can clone a source DB system in the same region or from another region, and you can optionally create a replication channel between the source DB system and the new DB system during the clone operation.
Cloning is supported from a standalone or high availability DB system, with or without a HeatWave cluster, to a new standalone or high availability DB system, with or without a HeatWave cluster. When you clone a DB system, only InnoDB data is cloned. If the source DB system has MySQL HeatWave Lakehouse enabled, the Lakehouse data is not cloned. If you add a HeatWave cluster to the cloned DB system later, the data is not loaded automatically into the HeatWave cluster, and you must load it manually.
You cannot create a clone DB system that has the same IP address as a running source DB system. 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.
- To create a clone DB system, you must have an existing DB system in the same tenancy and compartment that you can use as the source DB system.
- A policy that permits you to create DB systems in the compartment or tenancy. See IAM Policies.
- In the source DB system region, policies that permit you to read MySQL instances and configurations and create, read, and delete backups. If you create the clone DB system in a different region from the source DB system, you also need permission to copy backups in the source DB system region. See mysql-instances, mysql-configurations, and mysql-backups.
- In the destination region, which can be the same or different from the source DB system region, policies that permit you to create, read, and delete backups. If you create a replication channel during the clone operation, you also need permission to create replication channels in the destination region. See mysql-backups and mysql-channels.
- A properly configured VCN. See Creating a Virtual Cloud Network.
- If you want to create a replication during the clone operation, ensure the
following:
- A replication user exists on the source DB system and that you have the required credentials available. See Creating a Replication User On a Source Server.
- The source DB system uses a configuration wherein the
binlog_expire_logs_secondsvariable is set to:259200(72 hours) source DB system and the new cloned DB system are in the same region.345600(96 hours) source DB system and the new cloned DB system are in different regions.
- If you use
VERIFY_CAorVERIFY_IDENTITYfor the replication channel, the CA X509 certificate of the source DB system.
You can use the following methods to clone an existing DB system to a new DB system in the same tenancy:
- Using the Console
- Using the CLI
- Using the REST API, run the CreateDbSystem operation with the
sourceattribute set to CreateDbSystemSourceFromDbSystemDetails.
Using the Console
Use the Console to clone an existing DB system to a new DB system.
Using the CLI
Use the command-line interface to clone a DB system to a new DB system.
- A compartment, subnet, and source DB system Oracle Cloud Identifier (OCID).
- The name of a shape and availability domain.
- If you want to clone from another region, the source region identifier.
- A properly configured CLI installation and the requisite SSH keys. See Command Line Interface.