steampipe plugin install oci

Table: oci_mysql_backup - Query OCI MySQL Backups using SQL

MySQL Backups in Oracle Cloud Infrastructure (OCI) are automated or manual backups of your MySQL DB System. These backups are stored in OCI Object Storage and are used to restore a DB System to a specific point in time. The backup data includes the data volume and the system volume.

Table Usage Guide

The oci_mysql_backup table provides insights into MySQL backups within Oracle Cloud Infrastructure (OCI). As a DBA or DevOps engineer, explore backup-specific details through this table, including backup type, lifecycle state, and associated metadata. Utilize it to uncover information about backups, such as those with specific creation and expiry times, the DB system associated with the backup, and the verification of backup configurations.

Examples

Basic info

Analyze your MySQL backups in Oracle Cloud Infrastructure to understand their current lifecycle state, backup type, and MySQL version. This can help manage backups more efficiently and ensure they're configured correctly for your needs.

select
display_name,
id,
description,
lifecycle_state as state,
backup_type,
mysql_version
from
oci_mysql_backup;
select
display_name,
id,
description,
lifecycle_state as state,
backup_type,
mysql_version
from
oci_mysql_backup;

List manual backups

Explore which MySQL backups have been manually created. This is useful for understanding how many backups have been created by user intervention, which can help in managing resources and planning future automated backups.

select
display_name,
id,
creation_type
from
oci_mysql_backup
where
creation_type = 'MANUAL';
select
display_name,
id,
creation_type
from
oci_mysql_backup
where
creation_type = 'MANUAL';

List backups with retention days less than 90 days

Determine areas in which backups have a retention period of less than 90 days. This can be useful for identifying potential vulnerabilities or non-compliance with data retention policies.

select
display_name,
id,
retention_in_days
from
oci_mysql_backup
where
retention_in_days < 90;
select
display_name,
id,
retention_in_days
from
oci_mysql_backup
where
retention_in_days < 90;

Count of backups per DB system

Explore the frequency of backups for each database system to understand how often data protection measures are being implemented. This can help in assessing the robustness of your data recovery strategy.

select
db_system_id,
count(*) as backup_count
from
oci_mysql_backup
group by
db_system_id;
select
db_system_id,
count(*) as backup_count
from
oci_mysql_backup
group by
db_system_id;

Schema for oci_mysql_backup

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
backup_size_in_gbsbigintThe size of the backup in GiBs.
backup_typetextThe type of backup.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
creation_typetext=If the backup was created automatically, or by a manual request.
data_storage_size_in_gbsbigintInitial size of the data volume in GiBs.
db_system_idtext=The OCID of the DB System the Backup is associated with.
db_system_snapshotjsonbSnapshot of the DbSystem details at the time of the backup.
defined_tagsjsonbDefined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources.
descriptiontextA user-supplied description of the backup.
display_nametext=A user-supplied display name for the backup.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the backup.
lifecycle_detailstextAdditional information about the current lifecycleState.
lifecycle_statetext=The current state of the Backup.
mysql_versiontextThe version of the DB System used for backup.
regiontextThe OCI region in which the resource is located.
retention_in_daysbigintNumber of days to retain this backup.
shape_nametextThe shape of the DB System instance used for backup.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
tagsjsonbA map of tags for the resource.
tenant_idtext=, !=, ~~, ~~*, !~~, !~~*The OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
time_createdtimestamp with time zoneThe time the backup record was created.
time_updatedtimestamp with time zoneThe time at which the backup was updated.
titletextTitle of the resource.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci

You can pass the configuration to the command with the --config argument:

steampipe_export_oci --config '<your_config>' oci_mysql_backup