More Info:
Boot volumes should have a backup policy assigned. Without automated backups, data loss from instance failure, corruption, or ransomware cannot be recovered.Risk Level
MediumAddress
Compliance, SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- Essential 8
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- Reserve Bank of India (RBI) Master Direction – Information Technology Framework
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate “OCI Compute Boot Volumes Should Have Backup Policy Assigned” using the OCI Console:
1. Assign a Backup Policy to Existing Boot Volumes
- Sign in to the OCI Console.
- In the left navigation menu, go to:
Menu → Storage → Block Storage → Boot Volumes. - At the top, select the correct Compartment where your instances/boot volumes reside.
- For each boot volume that shows No backup policy:
- Click the boot volume name.
- On the boot volume detail page, click Assign Backup Policy (or Edit if available).
- In the Backup Policy dropdown, choose an appropriate predefined policy, for example:
bronze(daily, shorter retention)silver(daily + weekly, medium retention)gold(daily + weekly + monthly, longest retention)
or your custom policy if you have one.
- Click Assign (or Save changes).
2. Set a Default Backup Policy for New Boot Volumes (Recommended)
To avoid future non-compliance:- Go to: Menu → Storage → Block Storage → Block Volume Backups → Policies.
- Either:
- Use an existing Predefined Policy, or
- Click Create Policy to define a custom schedule/retention.
- Once you’ve chosen the policy, set it as default for a compartment:
- Go to: Menu → Identity & Security → Identity → Compartments.
- Select your Compartment.
- Look for Default backup policy for block/boot volumes (wording may vary by console version).
- Choose the desired backup policy and Save.
3. Verify Compliance (for Monitoring / Security Reports)
- Return to: Menu → Storage → Block Storage → Boot Volumes.
- Confirm that the Backup Policy column shows a policy (not “None”) for every boot volume.
- If you are using Cloud Guard / Security Zones / Security Center-like monitoring, run or refresh the compliance check so the “boot volumes should have backup policy” finding is cleared.
Using CLI
Using CLI
Below are step‑by‑step CLI instructions to assign an OCI Block Volume Backup Policy to Compute boot volumes so they comply with “Boot Volumes Should Have Backup Policy Assigned.”
Common Oracle‑managed policies are usually named like
Pick the
Each entry has a
For scripting, grab them as:
For a specific boot volume:If this returns an empty list, the boot volume has no backup policy and is non‑compliant.
Verify:You should see the selected policy associated.
Ensure every boot volume reported by:has at least one corresponding
1. Prerequisites
- OCI CLI installed and configured (
~/.oci/configwith a working profile). - OCIDs ready:
- Your tenancy OCID and/or compartment OCID.
- User running CLI must have permissions to manage boot volumes and volume backup policies.
- Profile:
DEFAULT - Compartment OCID:
ocid1.compartment.oc1..xxxx
--profile <PROFILE> to every oci command.2. List Available Backup Policies
First, see which backup policies exist in your region (Oracle‑managed or custom):gold, silver, bronze.Pick the
policy-id you want; call it:3. List Boot Volumes in a Compartment
id field; that is the boot volume OCID.For scripting, grab them as:
4. (Optional) Identify Boot Volumes Without a Policy
To see current policy assignments for all volumes in the compartment:5. Assign Backup Policy to a Single Boot Volume
Use the chosen policy OCID from step 2 and the boot volume OCID from step 3:6. Bulk‑Assign Policy to All Boot Volumes in a Compartment
This loop assigns the same backup policy to every boot volume in the compartment:7. Confirm Compliance for Monitoring
Re-run:volume-backup-policy-assignment. Your OCI monitoring / security/compliance tool should now show “Boot Volumes Should Have Backup Policy Assigned” as remediated.Using Python
Using Python
Here’s how you can remediate “OCI Compute Boot Volumes Should Have Backup Policy Assigned” using Python and the OCI SDK, by:
Copy the
- Finding boot volumes without a backup policy
- Assigning a chosen backup policy to them
1. Prerequisites
- Install the OCI Python SDK:
-
Set up your
~/.oci/configfile with:tenancy,user,fingerprint,key_file,region- A profile name, e.g.
[DEFAULT]
- Ensure the principal (user/group/instance/principal) has IAM permissions similar to:
2. Decide which Backup Policy to Apply
You can use a predefined policy (e.g. “gold”, “silver”, “bronze”) or a custom one.Example: find available backup policies and pick one:id of the policy you want, e.g.:3. Script: Assign Backup Policy to All Boot Volumes Without One
This example:- Iterates over all compartments (recursive)
- Lists boot volumes
- Checks if each has at least one backup policy assignment
- Assigns
TARGET_BACKUP_POLICY_IDwhere missing
4. Integrate with Monitoring / Compliance
Typical options:- Run this script on a schedule (e.g., cron on a bastion host, OCI Compute instance, or OCI Container Instances).
- Or, wrap it as an OCI Function invoked by:
- An Event from Cloud Guard/Cloud Events when a new boot volume/instance is created.
- A periodic trigger (e.g., via external scheduler or Functions + Alarm/Event).
Using Terraform
Using Terraform
terraform plan should show creation of an oci_core_volume_backup_policy_assignment resource (and optionally an oci_core_volume_backup_policy if you added one), with no planned replacement of the existing oci_core_boot_volume.
