This page describes how to create a peer database for your Autonomous Database in Google Cloud.
Once you create an Autonomous Database, you can set up one or more peer databases for it as a part of your disaster recovery plan.
You can only create peer databases with Autonomous Data Guard. For APEX and JSON workloads, you can't create a peer database with Autonomous Data Guard.
Before you begin
- In the OCI console, ensure that you are subscribed to the region in which you want to create the peer database.
Ensure that you have the following Identity and Access Management (IAM) roles and permissions required to create a peer database:
roles/autonomousDatabaseAdmin
Create a peer database
To create a peer database, do the following:
Console
Go to the Autonomous Database page.
Click the name of the Autonomous Database for which you want to create a peer database.
On the Autonomous Database details page, click the Disaster Recovery tab.
In the Peer database section, click Create.
On the Add peer database page, do the following:
Select a region. The regions in which you already have peer databases don't appear in the list.
If you already have peer databases in all regions and no additional region appears in the list, then you can't create any more peer databases.
(Optional) Select the Enable cross-region backup replication to disaster recovery peer checkbox. This option enables backup replication to your peer database for up to seven days or for the selected backup retention period (if less than seven days).
In the Subnet range field, enter the subnet range for your Autonomous Database. Ensure that the range doesn't overlap with the subnets in the associated VPC network.
Click Show advanced settings and enter the following details:
- Private IP address
- Hostname prefix
Click Save.
On the Disaster recovery tab, in the Peer database section, the Status field shows you the progress of the create operation. The peer database is ready to use when the Status field shows "Standby".
gcloud
Use the gcloud oracle-database autonomous-databases create
command to create a peer database.
gcloud oracle-database autonomous-databases create DATABASE_ID
--project=PROJECT_ID
--location=REGION
--network=NETWORK
--cidr=CIDR_RANGE
--source-config-automatic-backups-replication-enabled=ENABLE_BACKUP_REPLICATION
--properties-private-endpoint-ip=PRIVATE_IP_ADDRESS
--properties-private-endpoint-label=HOSTNAME_PREFIX
--source-config-autonomous-database=projects/PROJECT_ID/locations/REGION/autonomousDatabases/DATABASE_ID
Replace the following:
- DATABASE_ID: the ID of your database.
- PROJECT_ID: the ID of your Google Cloud project.
- REGION: the region in which you want to create your peer database.
NETWORK: the name of the VPC network. The name must use following format:
projects/PROJECT_ID/locations/global/NETWORK_NAME
To create a VPC network project, see Configure VPC network.
CIDR_RANGE: the subnet range for your Autonomous Database. The subnet range must use CIDR notation, be IPv4 only, and not overlap with the subnet range of your Google Cloud network
ENABLE_BACKUP_REPLICATION: (Optional) enables backup replication to your peer database for up to seven days or for the selected backup retention period (if less than seven days). The default value is
false
.PRIVATE_IP_ADDRESS: (Optional) the Private IP address. If not provided, an IP address is chosen automatically.
HOSTNAME_PREFIX: (Optional) the custom hostname prefix. If not provided, a hostname prefix is chosen automatically.
When completed, you can view the new peer Autonomous Database in the Autonomous Databases list along with its details. Also, after creating a peer database in Google Cloud, you can manage and modify its network settings in the OCI console.
What's next
- View peer database details.
- Learn how to switchover to a a peer database.
- Delete a peer database.