Add On-Premises Database to Recovery Service Using Cloud Protect
The Cloud Protect Fleet Agent registers the on-premises database with Recovery Service to create a protected database.
In SQLcl, the rcv add database command automatically
detects the database clients and adds them to a specified OCI compartment. All the
databases are registered with the same Recovery Service subnet. The Oracle defined
Bronze protection policy is assigned by default. You can
also specify a protection policy of your choice.
If you want to add each database client to a separate OCI compartment and
assign different Recovery Service subnets and protection policies, then you must run
the rcv add database command along with the
-generate_config_only option to first generate a configuration
(JSON) file. Modify the configuration file to specify the required compartment ID,
Recovery Service subnet, and protection policy for each database. Then, run the
rcv add database command again, along with the configuration
file. Oracle recommends that you follow this automated method to add databases to
Recovery Service.
Cloud Protect assigns the Oracle defined Bronze protection policy as the default policy for all databases. You can change the default policy in the configuration file before adding the database.
In the manual approach, you connect to each database (with
SYSBACKUP privileges) and then run the rcv add
database command to add the database individually.
When you run the rcv add database command, the Cloud Protect Fleet
Agent performs these steps internally:
- Verifies the prerequisites for adding the database to Recovery Service.
- Creates a
SYSBACKUPuser and password, if theSYSBACKUPuser does not exist.Note
The
SYSBACKUPuser and password is required for the Cloud Protect Fleet Agent to establish a named connection to the database. Use this command to connect to the database as theSYSBACKUPuser:/opt/oracle/sqlcl/bin/sql -name <DB_UNIQUE_NAME>_rcv_connDB_UNIQUE_NAMEis the globally unique name of the database. - Generates a random password for the
VPCuser account. The VPC user credentials are required to authenticate database access to the RMAN recovery catalog. - Invokes the Recovery Service API to create a protected database resource.
- Waits until the protected database enters the Active life cycle state.
- Registers the database in Recovery Appliance of Recovery Service using RMAN
- Configures the protected database with Cloud Protect.
- Cloud Protect maintains data protection.
Use these steps to add an on-premises database to Recovery Service.