Skip to main content

volume_backups

Creates, updates, deletes, gets or lists a volume_backups resource.

Overview​

Namevolume_backups
TypeResource
Idoci.block_storage.volume_backups

Fields​

The following fields are returned by SELECT queries:

The volume backup was retrieved.

NameDatatypeDescription
idstringThe OCID of the volume backup.
compartmentIdstringThe OCID of the compartment that contains the volume backup.
definedTagsobjectDefined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}}
displayNamestringA user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
expirationTimestring (date-time)The date and time the volume backup will expire and be automatically deleted. Format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339). This parameter will always be present for backups that were created automatically by a scheduled-backup policy. For manually created backups, it will be absent, signifying that there is no expiration time and the backup will last forever until manually deleted.
freeformTagsobjectFree-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](/iaas/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"}
kmsKeyIdstringThe OCID of the Vault service key which is the master encryption key for the volume backup. For more information about the Vault service and encryption keys, see [Overview of Vault service](/iaas/Content/KeyManagement/Concepts/keyoverview.htm) and [Using Keys](/iaas/Content/KeyManagement/Tasks/usingkeys.htm).
lifecycleStatestringThe current state of a volume backup. (CREATING, AVAILABLE, TERMINATING, TERMINATED, FAULTY, REQUEST_RECEIVED)
sizeInGBsinteger (int64)The size of the volume, in GBs.
sizeInMBsinteger (int64)The size of the volume in MBs. The value must be a multiple of 1024. This field is deprecated. Please use sizeInGBs.
sourceTypestringSpecifies whether the backup was created manually, or via scheduled backup policy. (MANUAL, SCHEDULED)
sourceVolumeBackupIdstringThe OCID of the source volume backup.
timeCreatedstring (date-time)The date and time the volume backup was created. This is the time the actual point-in-time image of the volume data was taken. Format defined by [RFC3339](https:​//tools.ietf.org/html/rfc3339).
timeRequestReceivedstring (date-time)The date and time the request to create the volume backup was received. Format defined by [RFC3339]https:​//tools.ietf.org/html/rfc3339.
typestringThe type of a volume backup. (FULL, INCREMENTAL)
uniqueSizeInGBsinteger (int64)The size used by the backup, in GBs. It is typically smaller than sizeInGBs, depending on the space consumed on the volume and whether the backup is full or incremental.
uniqueSizeInMbsinteger (int64)The size used by the backup, in MBs. It is typically smaller than sizeInMBs, depending on the space consumed on the volume and whether the backup is full or incremental. This field is deprecated. Please use uniqueSizeInGBs.
volumeIdstringThe OCID of the volume.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectvolumeBackupId, regionGets information for the specified volume backup.
listselectcompartmentId, regionvolumeId, limit, page, displayName, sourceVolumeBackupId, sortBy, sortOrder, lifecycleStateLists the volume backups in the specified compartment. You can filter the results by volume.<br />
createinsertregion, volumeIdopc-retry-tokenCreates a new backup of the specified volume. For general information about volume backups,<br />see [Overview of Block Volume Service Backups](/iaas/Content/Block/Concepts/blockvolumebackups.htm)<br /><br />When the request is received, the backup object is in a REQUEST_RECEIVED state.<br />When the data is imaged, it goes into a CREATING state.<br />After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state.<br />
updateupdatevolumeBackupId, regionif-matchUpdates the display name for the specified volume backup.<br />Avoid entering confidential information.<br />
deletedeletevolumeBackupId, regionif-matchDeletes a volume backup.
change_compartmentexecvolumeBackupId, region, compartmentIdopc-request-idMoves a volume backup into a different compartment within the same tenancy.<br />For information about moving resources between compartments,<br />see [Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br />
copy_volume_backupexecvolumeBackupId, region, destinationRegionopc-retry-token, opc-request-idCreates a volume backup copy in specified region. For general information about volume backups,<br />see [Overview of Block Volume Service Backups](/iaas/Content/Block/Concepts/blockvolumebackups.htm)<br />

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
compartmentIdstringThe [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
regionstringOCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION)
volumeBackupIdstringThe OCID of the volume backup.
displayNamestringA filter to return only resources that match the given display name exactly.
if-matchstringFor optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value.
lifecycleStatestringA filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
limitintegerFor list pagination. The maximum number of results per page, or items to return in a paginated "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine). Example: 50
opc-request-idstringUnique identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
pagestringFor list pagination. The value of the opc-next-page response header from the previous "List" call. For important details about how pagination works, see [List Pagination](/iaas/Content/API/Concepts/usingapi.htm#nine).
sortBystringThe field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. Note: In general, some "List" operations (for example, ListInstances) let you optionally filter by availability domain if the scope of the resource type is within a single availability domain. If you call one of these "List" operations without specifying an availability domain, the resources are grouped by availability domain, then sorted.
sortOrderstringThe sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive.
sourceVolumeBackupIdstringA filter to return only resources that originated from the given source volume backup.
volumeIdstringThe OCID of the volume.

SELECT examples​

Gets information for the specified volume backup.

SELECT
id,
compartmentId,
definedTags,
displayName,
expirationTime,
freeformTags,
kmsKeyId,
lifecycleState,
sizeInGBs,
sizeInMBs,
sourceType,
sourceVolumeBackupId,
timeCreated,
timeRequestReceived,
type,
uniqueSizeInGBs,
uniqueSizeInMbs,
volumeId
FROM oci.block_storage.volume_backups
WHERE volumeBackupId = '{{ volumeBackupId }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Creates a new backup of the specified volume. For general information about volume backups,<br />see [Overview of Block Volume Service Backups](/iaas/Content/Block/Concepts/blockvolumebackups.htm)<br /><br />When the request is received, the backup object is in a REQUEST_RECEIVED state.<br />When the data is imaged, it goes into a CREATING state.<br />After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state.<br />

INSERT INTO oci.block_storage.volume_backups (
definedTags,
displayName,
freeformTags,
kmsKeyId,
type,
volumeId,
region,
opc-retry-token
)
SELECT
'{{ definedTags }}',
'{{ displayName }}',
'{{ freeformTags }}',
'{{ kmsKeyId }}',
'{{ type }}',
'{{ volumeId }}' /* required */,
'{{ region }}',
'{{ opc-retry-token }}'
RETURNING
id,
compartmentId,
definedTags,
displayName,
expirationTime,
freeformTags,
kmsKeyId,
lifecycleState,
sizeInGBs,
sizeInMBs,
sourceType,
sourceVolumeBackupId,
timeCreated,
timeRequestReceived,
type,
uniqueSizeInGBs,
uniqueSizeInMbs,
volumeId
;

UPDATE examples​

Updates the display name for the specified volume backup.<br />Avoid entering confidential information.<br />

UPDATE oci.block_storage.volume_backups
SET
definedTags = '{{ definedTags }}',
displayName = '{{ displayName }}',
freeformTags = '{{ freeformTags }}',
kmsKeyId = '{{ kmsKeyId }}'
WHERE
volumeBackupId = '{{ volumeBackupId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match}}'
RETURNING
id,
compartmentId,
definedTags,
displayName,
expirationTime,
freeformTags,
kmsKeyId,
lifecycleState,
sizeInGBs,
sizeInMBs,
sourceType,
sourceVolumeBackupId,
timeCreated,
timeRequestReceived,
type,
uniqueSizeInGBs,
uniqueSizeInMbs,
volumeId;

DELETE examples​

Deletes a volume backup.

DELETE FROM oci.block_storage.volume_backups
WHERE volumeBackupId = '{{ volumeBackupId }}' --required
AND region = '{{ region }}' --required
AND if-match = '{{ if-match }}'
;

Lifecycle Methods​

Moves a volume backup into a different compartment within the same tenancy.<br />For information about moving resources between compartments,<br />see [Moving Resources to a Different Compartment](/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).<br />

EXEC oci.block_storage.volume_backups.change_compartment
@volumeBackupId='{{ volumeBackupId }}' --required,
@region='{{ region }}' --required,
@opc-request-id='{{ opc-request-id }}'
@@json=
'{
"compartmentId": "{{ compartmentId }}"
}'
;