Clone an Autonomous Database on Dedicated Exadata Infrastructure
Autonomous Databases with 23ai software version can not be cloned into an Autonomous Database with 19c version and vice-versa.
- Clone an Autonomous Database Instance
- Clone Autonomous Database from Backup
- Cross Tenancy Clone an Autonomous Database Instance
You can clone an Autonomous Database instance from one tenancy (source tenancy) to a different tenancy (destination tenancy). - Cross Tenancy Clone an Autonomous Database from Backup
You can clone an Autonomous Database backup from one tenancy (source tenancy) to a different tenancy (destination tenancy).
Parent topic: Create and Manage Dedicated Autonomous Databases
Clone an Autonomous Database Instance
Prerequisites
To view the requirements for successfully cloning an Autonomous Database instance, see Clone Requirements.
Required IAM Policies
manage autonomous-databases
read autonomous-container-databases
Procedure
Follow these steps to clone an Autonomous Database instance using the Oracle Cloud Infrastructure console.
On the Oracle Cloud Infrastructure console the State shows Provisioning... until the new database is available.
Clone Autonomous Database from Backup
Prerequisites
To view the requirements for successfully cloning an Autonomous Database instance, see Clone Requirements.
Required IAM Policies
manage autonomous-databases
read autonomous-container-databases
Procedure
Follow these steps to clone an Autonomous Database from backup using the Oracle Cloud Infrastructure console.
On the Oracle Cloud Infrastructure console the State shows Provisioning... until the new database is available.
Cross Tenancy Clone an Autonomous Database Instance
APPLIES TO: Oracle Public Cloud only
The steps demonstrated in this topic apply to cross tenancy cloning with the source database and the cloned database in the same region or different regions (cross-region).
Cross tenancy cloning option is only available using the CLI or the Autonomous Database REST APIs. You cannot create a cross tenancy clone using the Oracle Cloud Infrastructure Console.
To create a cross tenancy clone from an Autonomous Database instance, you must first ensure all the clone requirements are met. Specifically, you need to define the OCI Identity and Access Management policies to authorize cross tenancy cloning. See Cross Tenancy Clone Requirements for details.
On the tenancy where you want to create the clone, that is, on the destination tenancy in the destination region, use the CLI or call the REST API, specifying a valid clone type (Full or Metadata) and the OCID of the source database, which resides in a different tenancy (the source tenancy).
oci db autonomous-database create-from-clone
--clone-type metadata
--compartment-id ocid1.compartment.oc1..unique_ID
--source-id ocid1.autonomousdatabase.oc1..unique_ID
--db-name dbnameclone
--display-name dbnameclone
--admin-password <password>
--data-storage-size-in-tbs 1
--compute-model ECPU
--compute-count 4
--autonomous-container-database-id ocid1.autonomouscontainerdatabase.oc1..unique_ID
source-id
is the OCID of the source Autonomous Database.autonomous-container-database-id
is the OCID of the destination Autonomous Container Database.compartment-id
is OCID of the compartment at the destination where the clone database would reside.
Once the command succeeds a work-request-id will be returned which can be used to track the progress of the clone. See create-from-clone for more information.
For information about SDKs, see Software Development Kits and Command Line Interface.
To create a cross tenancy clone from an Autonomous Database instance using REST API, use the CreateAutonomousDatabase
API.
oci raw-request
--debug
--http-method POST
--target-uri https://database.us-ashburn-1.oraclecloud.com/20160918/autonomousDatabases
--request-body '{
"cloneType": "full",
"displayName": "RAcloneV2",
"dbName": "RAcloneV2",
"compartmentId": "ocid1.compartment.oc1..unique_ID",
"sourceId": "ocid1.autonomousdatabase.oc1..unique_ID",
"autonomousContainerDatabaseId": "ocid1.autonomouscontainerdatabase.oc1..unique_ID",
"adminPassword": "<password>",
"dataStorageSizeInTBs": 1,
"computeCount": 1,
"computeModel": "ECPU",
"isDedicated": "True"
}'
Ensure to set
isDedicated
to True
to clone an Autonomous Database on Dedicated Exadata Infrastructure.
See CreateAutonomousDatabase and CreateAutonomousDatabaseCloneDetails for additional information on these REST API.
For information about using the API and signing requests, see REST APIs and Security Credentials.
Cross Tenancy Clone an Autonomous Database from Backup
APPLIES TO: Oracle Public Cloud only
This topic demonstrates the steps to create a cross tenancy clone from a backup.
Cross tenancy cloning option is only available using the CLI or the Autonomous Database REST APIs. You cannot create a cross tenancy clone using the Oracle Cloud Infrastructure Console.
To create a cross tenancy clone from an Autonomous Database backup, you must first ensure all the clone requirements are met. Specifically, you need to define the OCI Identity and Access Management policies to authorize cross tenancy cloning. See Cross Tenancy Clone Requirements for details.
On the tenancy where you want to create the clone, that is, on the destination tenancy in the destination region, use the CLI or call the REST API, specifying a valid clone type (Full or Metadata) and the OCID of the source database, which resides in a different tenancy (the source tenancy).
oci db autonomous-database create-from-backup-timestamp
--compartment-id ocid1.compartment.oc1..unique_ID
--autonomous-database-id ocid1.autonomousdatabase.oc1..unique_ID
--clone-type FULL
--timestamp 2024-04-16T20:30:00.123456Z
--db-name ZZC08X42GU0B09GECA
--display-name clonedb
--admin-password <password>
--data-storage-size-in-tbs 1
--compute-model ECPU
--compute-count 4
--autonomous-container-database-id ocid1.autonomouscontainerdatabase.oc1..unique_ID
autonomous-database-id
is the OCID of the source Autonomous Database backup.autonomous-container-database-id
is the OCID of the destination Autonomous Container Database.compartment-id
is OCID of the compartment at the destination where the clone database would reside.
Once the command succeeds a work-request-id will be returned which can be used to track the progress of the clone. See create-from-backup-timestamp and create-from-backup-id for more information.
For information about SDKs, see Software Development Kits and Command Line Interface.
To create a cross tenancy clone from a backup of an existing Autonomous Database using REST API, use the CreateAutonomousDatabase
API.
oci raw-request
--debug
--http-method POST
--target-uri https://database.us-ashburn-1.oraclecloud.com/20160918/autonomousDatabases
--request-body '{
"compartmentId": "ocid1.compartment.oc1..unique_ID",
"dbName": "CTRAclonefrombackupid",
"autonomousDatabaseBackupId": "ocid1.autonomousdatabasebackup.oc1..unique_ID",
"cloneType": "FULL",
"cpuCoreCount": 1,
"dataStorageSizeInTBs": 1,
"adminPassword": "<password>",
"displayName": "CTRAclonefrombackupid",
"autonomousContainerDatabaseId": "ocid1.autonomouscontainerdatabase.oc1..unique_ID",
"source": "<BACKUP_FROM_ID>"
}'
oci raw-request
--debug
--http-method POST
--target-uri https://database.us-ashburn-1.oraclecloud.com/20160918/autonomousDatabases
--request-body '{
"compartmentId": "ocid1.compartment.oc1..unique_ID",
"dbName": "CTbackuptimestamopRA",
"autonomousDatabaseId":"ocid1.autonomousdatabase.oc1..unique_ID",
"timestamp": "2024-07-17T02:20:15.123456Z",
"cloneType": "FULL",
"cpuCoreCount": 1,
"dataStorageSizeInTBs": 1,
"adminPassword": "<password>",
"displayName": "CTbackuptimestamopRA",
"autonomousContainerDatabaseId": "ocid1.autonomouscontainerdatabase..unique_ID",
"source": "<BACKUP_FROM_TIMESTAMP>"
}'
See CreateAutonomousDatabase, CreateAutonomousDatabaseFromBackupDetails Reference, and CreateAutonomousDatabaseFromBackupTimestampDetails Reference for additional information on these REST API.
For information about using the API and signing requests, see REST APIs and Security Credentials.