Table: oci_file_storage_snapshot - Query OCI File Storage Snapshots using SQL
Oracle Cloud Infrastructure's File Storage service provides a durable, scalable, secure, enterprise-grade network file system. It allows you to dynamically grow and shrink your file system without the need to provision capacity ahead of time. File Storage supports the Network File System (NFS) protocol.
Table Usage Guide
The oci_file_storage_snapshot
table provides insights into snapshots within OCI File Storage. As a DevOps engineer, explore snapshot-specific details through this table, including the snapshot's lifecycle state, time created, and associated metadata. Utilize it to uncover information about snapshots, such as those with a specific lifecycle state or created at a specific time.
Examples
Basic info
- "Explore the basic information about your file storage snapshots, such as their names, IDs, states, creation times, provenance IDs, and regions."
- "Determine the number of snapshots created per file system to understand the distribution and usage of your storage resources."
- "Identify the snapshots that have been used as clone sources, helping you track the propagation of your data across your storage environment.
select name, id, lifecycle_state as state, time_created, provenance_id, regionfrom oci_file_storage_snapshot;
select name, id, lifecycle_state as state, time_created, provenance_id, regionfrom oci_file_storage_snapshot;
Count of snapshots created per file system
select file_system_id, count(*) as snapshots_countfrom oci_file_storage_snapshotgroup by file_system_id;
select file_system_id, count(*) as snapshots_countfrom oci_file_storage_snapshotgroup by file_system_id;
List cloned snapshots
select name, id, is_clone_sourcefrom oci_file_storage_snapshotwhere is_clone_source;
select name, id, is_clone_sourcefrom oci_file_storage_snapshotwhere is_clone_source = 1;
Query examples
Schema for oci_file_storage_snapshot
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
compartment_id | text | = | The OCID of the compartment in Tenant in which the resource is located. |
defined_tags | jsonb | Defined 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. | |
file_system_id | text | The OCID of the file system from which the snapshot was created. | |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The OCID of the snapshot. |
is_clone_source | boolean | Specifies whether the snapshot has been cloned. | |
lifecycle_details | text | Additional information about the current 'lifecycleState'. | |
lifecycle_state | text | = | The current state of the snapshot. |
name | text | Name of the snapshot. | |
provenance_id | text | An OCID identifying the parent from which this snapshot was cloned. | |
region | text | The OCI region in which the resource is located. | |
snapshot_time | timestamp with time zone | The date and time the snapshot was taken. | |
snapshot_type | text | Specifies the generation type of the snapshot. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tags | jsonb | A map of tags for the resource. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
tenant_name | text | The name of the Tenant in which the resource is located. | |
time_created | timestamp with time zone | The date and time the snapshot was created. | |
title | text | Title 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_file_storage_snapshot