Creating a Protection Policy
Create a custom protection policy in Recovery Service.
Using the Console
- On the Protection Policies list page, select Create protection policy. See Listing Protection Policies for detailed steps to access the list page.
- Enter a descriptive name for the protection policy. Avoid entering confidential information in the Name field.
- Verify the compartment where you want to create the policy. Use the Create in compartment field to select a different compartment, if necessary.
- In the Backup retention period (in days) field,
specify the maximum number of days to retain backups using this
policy.
You can specify a retention period value ranging from 14 days to a maximum period of 95 days.
- (Optional)
Use these steps to enforce a lock to the backup retention period.
- Select Enable retention lock.
- In the Scheduled lock time field, select a
date that occurs at least 14 days after the current date.
Recovery Service mandates a minimum delay of 14 days to permanently lock the retention period. During the delay period, you can either increase or decrease the retention period or disable the lock, if necessary. At the end of the specified time delay, the backup retention period is permanently locked. You are only allowed to increase the retention period.
- (Optional) Select the
Store backups in the same cloud provider as the
database option if the source database is provisioned in a
different cloud location and if you want Recovery
Service to store the backups in the
same cloud location as the database.
Recovery Service creates protected databases and related backups in Oracle Cloud by default. You can optionally override this default behavior for multicloud Oracle Databases such as Oracle Database@Azure and Oracle Database@Google Cloud.
If you enable the Store backups in the same cloud provider as the database option for a protection policy, then the policy-linked protected database and backups will be stored in the same cloud location where the database is provisioned. For example, for Oracle Database@Azure, Recovery Service stores the associated protected database backups in Azure if you have selected the Store backups in the same cloud provider as the database option in the protection policy.
If you do not select the Store backups in the same cloud provider as the database for a protection policy, then the policy-linked protected database and backups will be stored in Oracle Cloud even if your Oracle Database is provisioned in a different cloud location.
Caution:
You cannot undo the selection of the Store backups in the same cloud provider as the database option after you create the policy. - Expand Advanced options and add the following
information.
Tags: (Optional) Add one or more tags to the resource. If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you are not sure whether to apply tags, skip this option or ask an administrator. You can apply tags later.
- Select Create.
The protection policy is created.
Using the CLI
Use the oci recovery protection-policy create command and required parameters to create a protection policy.
See Autonomous Recovery Service CLI Command Reference for a complete list of parameters and values for CLI commands.
Using the API
Run the CreateProtectionPolicy API operation to create a protection policy.
Related Topics
Parent topic: Managing Protection Policies