This page describes how to create clones of Autonomous AI Databases in Google Cloud.
Oracle Database@Google Cloud lets you create clones of your existing Autonomous AI Databases. Cloning an Autonomous AI Database creates a new version of the database, leaving the source database intact.
You can create the following types of clones:
- Full clone: includes all of the source database's data and metadata.
- Metadata clone: includes the source database's metadata (users, roles, tables, and other database structures) but doesn't contain any of the source database's data.
- Refreshable clone: Autonomous AI Database serverless refreshable clones are read-only copies of a source database that can be updated incrementally to stay in sync with the primary environment without the overhead of a full re-cloning. These clones operate on their own independent compute and storage resources, making them ideal for offloading reporting workloads, providing up-to-date test environments, or sharing production data across business units without impacting the performance of the source system.
Limitations
- A clone can only be created within the same Google Cloud project.
- Cloning a standby database instance is not supported. The source database must be a primary database in a data guard configuration.
- The clone operation can create the clone in any available region, based on the availability of Autonomous AI Database Service in that region and the region you've subscribed to in Oracle Cloud Infrastructure (OCI).
- Changing the encryption key for databases that are the source of refreshable clones is not supported.
- Creating multiple clones concurrently is not supported. Cloning operations must be performed sequentially.
Before you begin
- Make sure that you've an existing Autonomous AI Database that serves as the source databases for cloning.
Make sure that you have the following Identity and Access Management (IAM) role required to perform clone operations:
roles/oracledatabase.autonomousDatabaseAdmin
To learn how to assign roles, see Apply IAM roles.
Create a clone
Clones can have different properties from that of the source database. Some of the attributes that you might want to change when cloning include the following:
-
You can clone between the following workload types:
Source database workload Clone database workload Autonomous AI Lakehouse Autonomous AI Transaction Processing Autonomous AI Transaction Processing Autonomous AI Lakehouse Autonomous AI JSON Database Autonomous AI Transaction Processing
Autonomous AI Lakehouse
APEX ServiceAPEX Service Autonomous AI JSON Database
Autonomous AI Transaction Processing
Autonomous AI Lakehouse Database version
Licensing model (BYOL or license included)
Backup retention period
Network connectivity type (public access or private endpoint only)
ODB Network and subnet
For full clones and metadata clones, you can use the following sources to create a clone:
You can create refreshable clones only from database instances.
You can create clones from databases configured with customer-managed encryption keys (CMEK) as well as Oracle Managed Encryption (OMK). For more information, see Cloning databases configured with CMEK.
The time required to clone an Autonomous AI Database can change depending on many factors, including the amount of data stored within the database. You can expect a cloning operation to take longer than creating a new Autonomous AI Database.
Clone from a database instance
You can create full clones and metadata clones from a database instance.
Basic full clone
To create a basic full clone from a database instance, do the following:
gcloud
Use the gcloud oracle-database autonomous-databases create command to
create a basic full clone from a database instance.
gcloud oracle-database autonomous-databases create CLONE_ID \
--project=PROJECT_ID \
--location=REGION \
--admin-password=ADMIN_PASSWORD \
--database=CLONE_NAME \
--display-name=DISPLAY_NAME \
--properties-license-type=LICENSE_TYPE \
--properties-compute-count=COMPUTE_COUNT \
--properties-db-version=DATABASE_VERSION \
--properties-db-workload=WORKLOAD_TYPE \
--properties-data-storage-size-gb=STORAGE_SIZE \
--properties-mtls-connection-required \
--source-config-autonomous-database="projects/PROJECT_ID/locations/REGION/autonomousDatabases/SOURCE_DATABASE_ID" \
--source-config-type="CLONE_DATABASE" \
--source-config-clone-type="FULL"
Replace the following:
- CLONE_ID: a unique ID for your clone.
- PROJECT_ID: the ID of your Google Cloud project.
- REGION: the region in which to create the clone.
- ADMIN_PASSWORD: the password for the default administrator user of the clone.
CLONE_NAME: a name for the clone. Consider the following guidelines:
- Must begin with an alphabetic character.
- Contain up to 30 alphanumeric characters.
- Must not include special characters.
- Must be unique in your OCI tenancy.
- Not required if you're creating a cross-region disaster recovery standby instance or cross-region Autonomous Data Guard standby instance.
DISPLAY_NAME: the name of the clone that appears in the Google Cloud console.
LICENSE_TYPE: the license type associated with your Oracle Database@Google Cloud order. Only accepted values are
bring-your-own-licenseorlicense-included.COMPUTE_COUNT: the compute capacity for the clone.
DATABASE_VERSION: the Oracle database version for the clone.
WORKLOAD_TYPE: the workload type for the clone that must be one of the following:
ajd: Autonomous JSON Databaseapex: Autonomous Database with Oracle APEX Application Development workload typedw: Autonomous Data Warehouse databaseoltp: Autonomous Transaction Processing database
STORAGE_SIZE: the preferred storage count. Storage can range from 0.02 TiB to 384 TiB.
For Data Warehouse workloads only, storage is measured in terabyte (TiB) increments and must range from 1 TiB to 384 TiB.
For
--source-config-autonomous-databaseproperty, replace the following:- PROJECT_ID: the ID of the Google Cloud project which contains your source Autonomous AI Database. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region where the source database is located.
- SOURCE_DATABASE_ID: the ID of the source database.
API
To create a basic full clone from a database instance, run the following
curl command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/autonomousDatabases/CLONE_ID"
-d \
'{
"name": "projects/PROJECT_ID/locations/REGION/autonomousDatabases/CLONE_ID",
"admin_password": "ADMIN_PASSWORD",
"database": "CLONE_NAME",
"displayName": "DISPLAY_NAME",
"properties": {
"licenseType": "LICENSE_TYPE",
"computeCount": COMPUTE_COUNT,
"dbVersion": "DATABASE_VERSION",
"dbWorkload": "WORKLOAD_TYPE",
"dataStorageSizeTb": STORAGE_SIZE,
"mtlsConnectionRequired": true
},
"sourceConfig": {
"sourceType": "CLONE_DATABASE",
"autonomousDatabase": "projects/PROJECT_ID/locations/REGION/autonomousDatabases/SOURCE_DATABASE_ID",
"cloneType": "FULL"
}
}'
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project.
- REGION: the region in which to create the clone.
- CLONE_ID: a unique ID for the clone.
- ADMIN_PASSWORD: the password for the default administrator user of the clone.
CLONE_NAME: a name for the clone. Consider the following guidelines:
- Must begin with an alphabetic character.
- Contain up to 30 alphanumeric characters.
- Must not include special characters.
- Must be unique in your OCI tenancy.
- Not required if you're creating a cross-region disaster recovery standby instance or cross-region Autonomous Data Guard standby instance.
DISPLAY_NAME: the name of the clone that appears in the Google Cloud console.
LICENSE_TYPE: the license type associated with your Oracle Database@Google Cloud order. Only accepted values are
bring-your-own-licenseorlicense-included.COMPUTE_COUNT: the compute capacity for the clone.
DATABASE_VERSION: the Oracle database version for the clone.
WORKLOAD_TYPE: the workload type for the clone that must be one of the following:
ajd: Autonomous JSON Databaseapex: Autonomous Database with Oracle APEX Application Development workload typedw: Autonomous Data Warehouse databaseoltp: Autonomous Transaction Processing database
STORAGE_SIZE: the preferred storage count. Storage can range from 0.02 TiB to 384 TiB.
For Data Warehouse workloads only, storage is measured in terabyte (TiB) increments and must range from 1 TiB to 384 TiB.
For
autonomousDatabaseproperty, replace the following:- PROJECT_ID: the ID of the Google Cloud project which contains your source Autonomous AI Database. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region where the source database is located.
- BACKUP_ID: the ID of the source database.
Basic metadata clone
To create a basic metadata clone from a database instance, do the following:
gcloud
Use the gcloud oracle-database autonomous-databases create command to
create a basic metadata clone from a database instance.
gcloud oracle-database autonomous-databases create CLONE_ID \
--project=PROJECT_ID \
--location=REGION \
--admin-password=ADMIN_PASSWORD \
--database=CLONE_NAME \
--display-name=DISPLAY_NAME \
--properties-license-type=LICENSE_TYPE \
--properties-compute-count=COMPUTE_COUNT \
--properties-db-version=DATABASE_VERSION \
--properties-db-workload=WORKLOAD_TYPE \
--properties-data-storage-size-gb=STORAGE_SIZE \
--properties-mtls-connection-required \
--source-config-autonomous-database="projects/PROJECT_ID/locations/REGION/autonomousDatabases/SOURCE_DATABASE_ID" \
--source-config-type="CLONE_DATABASE" \
--source-config-clone-type="METADATA"
Replace the following:
- CLONE_ID: a unique ID for your clone.
- PROJECT_ID: the ID of your Google Cloud project.
- REGION: the region in which to create the clone.
- ADMIN_PASSWORD: the password for the default administrator user of the clone.
CLONE_NAME: a name for the clone. Consider the following guidelines:
- Must begin with an alphabetic character.
- Contain up to 30 alphanumeric characters.
- Must not include special characters.
- Must be unique in your OCI tenancy.
- Not required if you're creating a cross-region disaster recovery standby instance or cross-region Autonomous Data Guard standby instance.
DISPLAY_NAME: the name of the clone that appears in the Google Cloud console.
LICENSE_TYPE: the license type associated with your Oracle Database@Google Cloud order. Only accepted values are
bring-your-own-licenseorlicense-included.COMPUTE_COUNT: the compute capacity for the clone.
DATABASE_VERSION: the Oracle database version for the clone.
WORKLOAD_TYPE: the workload type for the clone that must be one of the following:
ajd: Autonomous JSON Databaseapex: Autonomous Database with Oracle APEX Application Development workload typedw: Autonomous Data Warehouse databaseoltp: Autonomous Transaction Processing database
STORAGE_SIZE: the preferred storage count. Storage can range from 0.02 TiB to 384 TiB.
For Data Warehouse workloads only, storage is measured in terabyte (TiB) increments and must range from 1 TiB to 384 TiB.
For
--source-config-autonomous-databaseproperty, replace the following:- PROJECT_ID: the ID of the Google Cloud project which contains your source Autonomous AI Database. If you're using a Shared VPC, then this is the ID of your host project.
- REGION: the region where the source database is located.
- SOURCE_DATABASE_ID: the ID of the source database.
API
To create a basic metadata clone from a database instance, run the following
curl command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://oracledatabase.googleapis.com/v1/projects/PROJECT_ID/locations/REGION/autonomousDatabases/CLONE_ID"
-d \
'{
"name": "projects/PROJECT_ID/locations/REGION/autonomousDatabases/CLONE_ID",
"admin_password": "ADMIN_PASSWORD",
"database": "CLONE_NAME",
"displayName": "DISPLAY_NAME",
"properties": {
"licenseType": "LICENSE_TYPE",
"computeCount": COMPUTE_COUNT,
"dbVersion": "DATABASE_VERSION",
"dbWorkload": "WORKLOAD_TYPE",
"dataStorageSizeTb": STORAGE_SIZE,
"mtlsConnectionRequired": true
},
"sourceConfig": {
"sourceType": "CLONE_DATABASE",
"autonomousDatabase": "projects/PROJECT_ID/locations/REGION/autonomousDatabases/SOURCE_DATABASE_ID",
"cloneType": "METADATA"
}
}'
Replace the following:
- PROJECT_ID: the ID of your Google Cloud project.
- REGION: the region in which to create the clone.
- CLONE_ID: a unique ID for the clone.
- ADMIN_PASSWORD: the password for the default administrator user of the clone.
CLONE_NAME: a name for the clone. Consider the following guidelines:
- Must begin with an alphabetic character.
- Contain up to 30 alphanumeric characters.
- Must not include special characters.
- Must be unique in your OCI tenancy.
- Not required if you're creating a cross-region disaster recovery standby instance or cross-region Autonomous Data Guard standby instance.
DISPLAY_NAME: the name of the clone that appears in the Google Cloud console.
LICENSE_TYPE: the license type associated with your Oracle Database@Google Cloud order. Only accepted values are
bring-your-own-licenseorlicense-included.COMPUTE_COUNT: the compute capacity for the clone.
DATABASE_VERSION: the Oracle database version for the clone.
WORKLOAD_TYPE: the workload type for the clone that must be one of the following: