Skip to main content

backups

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

Overview

Namebackups
TypeResource
Idaws.fsx.backups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
backup_idstringThe ID of the backup. (pattern: <code>^(backup-[0-9a-f]{8,})$</code>)
creation_timestring (date-time)The time when a particular backup was created.
directory_informationobjectThe configuration of the self-managed Microsoft Active Directory directory to which the Windows File Server instance is joined.
failure_detailsobjectDetails explaining any failures that occurred when creating a backup.
file_systemobjectThe metadata of the file system associated with the backup. This metadata is persisted even if the file system is deleted.
kms_key_idstringSpecifies the ID of the Key Management Service (KMS) key to use for encrypting data on Amazon FSx file systems, as follows: Amazon FSx for Lustre PERSISTENT_1 and PERSISTENT_2 deployment types only. SCRATCH_1 and SCRATCH_2 types are encrypted using the Amazon FSx service KMS key for your account. Amazon FSx for NetApp ONTAP Amazon FSx for OpenZFS Amazon FSx for Windows File Server If a KmsKeyId isn't specified, the Amazon FSx-managed KMS key for your account is used. For more information, see Encrypt in the Key Management Service API Reference. (pattern: <code>^.{1,2048}$</code>)
lifecyclestringThe lifecycle status of the backup. AVAILABLE - The backup is fully available. PENDING - For user-initiated backups on Lustre file systems only; Amazon FSx hasn't started creating the backup. CREATING - Amazon FSx is creating the backup. TRANSFERRING - For user-initiated backups on Lustre file systems only; Amazon FSx is transferring the backup to Amazon S3. COPYING - Amazon FSx is copying the backup. DELETED - Amazon FSx deleted the backup and it's no longer available. FAILED - Amazon FSx couldn't finish the backup. (AVAILABLE, CREATING, TRANSFERRING, DELETED, FAILED, PENDING, COPYING)
owner_idstringAn Amazon Web Services account ID. This ID is a 12-digit number that you use to construct Amazon Resource Names (ARNs) for resources. (pattern: <code>^\d{12}$</code>)
progress_percentintegerDisplays the current percent of progress of an asynchronous task.
resource_arnstringThe Amazon Resource Name (ARN) for the backup resource. (pattern: <code>^arn:(?=[^:]+:fsx:[^:]+:\d{12}:)((|(?=[a-z0-9-.]{1,63})(?!\d{1,3}(.\d{1,3}){3})(?![^:]-{2})(?![^:]-.)(?![^:].-)[a-z0-9].(?<!-)):){4}(?!/).{0,1024}$</code>)
resource_typestringSpecifies the resource type that's backed up. (FILE_SYSTEM, VOLUME)
size_in_bytesinteger (int64)The size of the backup in bytes. This represents the amount of data that the file system would contain if you restore this backup.
source_backup_idstringThe ID of the source backup. Specifies the backup that you are copying. (pattern: <code>^(backup-[0-9a-f]{8,})$</code>)
source_backup_regionstringThe source Region of the backup. Specifies the Region from where this backup is copied. (pattern: <code>^[a-z0-9-]{1,20}$</code>)
tagsarrayA list of Tag values, with a maximum of 50 elements.
typestringThe type of the file-system backup. (AUTOMATIC, USER_INITIATED, AWS_BACKUP)
volumeobjectDescribes an Amazon FSx volume.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_backupsselectregionReturns the description of a specific Amazon FSx backup, if a BackupIds value is provided for that backup. Otherwise, it returns all backups owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling. When retrieving all backups, you can optionally specify the MaxResults parameter to limit the number of backups in a response. If more backups remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of the NextToken value from the last response. This operation is used in an iterative process to retrieve a list of your backups. DescribeBackups is called first without a NextToken value. Then the operation continues to be called with the NextToken parameter set to the value of the last NextToken value until a response has no NextToken value. When using this operation, keep the following in mind: The operation might return fewer than the MaxResults value of backup descriptions while still including a NextToken value. The order of the backups returned in the response of one DescribeBackups call and the order of the backups returned across the responses of a multi-call iteration is unspecified.
create_file_system_from_backupinsertregion, BackupId, SubnetIdsCreates a new Amazon FSx for Lustre, Amazon FSx for Windows File Server, or Amazon FSx for OpenZFS file system from an existing Amazon FSx backup. If a file system with the specified client request token exists and the parameters match, this operation returns the description of the file system. If a file system with the specified client request token exists but the parameters don't match, this call returns IncompatibleParameterError. If a file system with the specified client request token doesn't exist, this operation does the following: Creates a new Amazon FSx file system from backup with an assigned ID, and an initial lifecycle state of CREATING. Returns the description of the file system. Parameters like the Active Directory, default share name, automatic backup, and backup settings default to the parameters of the file system that was backed up, unless overridden. You can explicitly supply other settings. By using the idempotent operation, you can retry a CreateFileSystemFromBackup call without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives a success message as long as the parameters are the same. The CreateFileSystemFromBackup call returns while the file system's lifecycle state is still CREATING. You can check the file-system creation status by calling the DescribeFileSystems operation, which returns the file system state along with other information.
create_volume_from_backupinsertregion, BackupId, NameCreates a new Amazon FSx for NetApp ONTAP volume from an existing Amazon FSx volume backup.
create_backupinsertregionCreates a backup of an existing Amazon FSx for Windows File Server file system, Amazon FSx for Lustre file system, Amazon FSx for NetApp ONTAP volume, or Amazon FSx for OpenZFS file system. We recommend creating regular backups so that you can restore a file system or volume from a backup if an issue arises with the original file system or volume. For Amazon FSx for Lustre file systems, you can create a backup only for file systems that have the following configuration: A Persistent deployment type Are not linked to a data repository For more information about backups, see the following: For Amazon FSx for Lustre, see Working with FSx for Lustre backups. For Amazon FSx for Windows, see Working with FSx for Windows backups. For Amazon FSx for NetApp ONTAP, see Working with FSx for NetApp ONTAP backups. For Amazon FSx for OpenZFS, see Working with FSx for OpenZFS backups. If a backup with the specified client request token exists and the parameters match, this operation returns the description of the existing backup. If a backup with the specified client request token exists and the parameters don't match, this operation returns IncompatibleParameterError. If a backup with the specified client request token doesn't exist, CreateBackup does the following: Creates a new Amazon FSx backup with an assigned ID, and an initial lifecycle state of CREATING. Returns the description of the backup. By using the idempotent operation, you can retry a CreateBackup operation without the risk of creating an extra backup. This approach can be useful when an initial call fails in a way that makes it unclear whether a backup was created. If you use the same client request token and the initial call created a backup, the operation returns a successful result because all the parameters are the same. The CreateBackup operation returns while the backup's lifecycle state is still CREATING. You can check the backup creation status by calling the DescribeBackups operation, which returns the backup state along with other information.
delete_backupdeleteregionDeletes an Amazon FSx backup. After deletion, the backup no longer exists, and its data is gone. The DeleteBackup call returns instantly. The backup won't show up in later DescribeBackups calls. The data in a deleted backup is also deleted and can't be recovered by any means.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the description of a specific Amazon FSx backup, if a BackupIds value is provided for that backup. Otherwise, it returns all backups owned by your Amazon Web Services account in the Amazon Web Services Region of the endpoint that you're calling. When retrieving all backups, you can optionally specify the MaxResults parameter to limit the number of backups in a response. If more backups remain, Amazon FSx returns a NextToken value in the response. In this case, send a later request with the NextToken request parameter set to the value of the NextToken value from the last response. This operation is used in an iterative process to retrieve a list of your backups. DescribeBackups is called first without a NextToken value. Then the operation continues to be called with the NextToken parameter set to the value of the last NextToken value until a response has no NextToken value. When using this operation, keep the following in mind: The operation might return fewer than the MaxResults value of backup descriptions while still including a NextToken value. The order of the backups returned in the response of one DescribeBackups call and the order of the backups returned across the responses of a multi-call iteration is unspecified.

SELECT
backup_id,
creation_time,
directory_information,
failure_details,
file_system,
kms_key_id,
lifecycle,
owner_id,
progress_percent,
resource_arn,
resource_type,
size_in_bytes,
source_backup_id,
source_backup_region,
tags,
type,
volume
FROM aws.fsx.backups
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new Amazon FSx for Lustre, Amazon FSx for Windows File Server, or Amazon FSx for OpenZFS file system from an existing Amazon FSx backup. If a file system with the specified client request token exists and the parameters match, this operation returns the description of the file system. If a file system with the specified client request token exists but the parameters don't match, this call returns IncompatibleParameterError. If a file system with the specified client request token doesn't exist, this operation does the following: Creates a new Amazon FSx file system from backup with an assigned ID, and an initial lifecycle state of CREATING. Returns the description of the file system. Parameters like the Active Directory, default share name, automatic backup, and backup settings default to the parameters of the file system that was backed up, unless overridden. You can explicitly supply other settings. By using the idempotent operation, you can retry a CreateFileSystemFromBackup call without the risk of creating an extra file system. This approach can be useful when an initial call fails in a way that makes it unclear whether a file system was created. Examples are if a transport level timeout occurred, or your connection was reset. If you use the same client request token and the initial call created a file system, the client receives a success message as long as the parameters are the same. The CreateFileSystemFromBackup call returns while the file system's lifecycle state is still CREATING. You can check the file-system creation status by calling the DescribeFileSystems operation, which returns the file system state along with other information.

INSERT INTO aws.fsx.backups (
BackupId,
ClientRequestToken,
SubnetIds,
SecurityGroupIds,
Tags,
WindowsConfiguration,
LustreConfiguration,
StorageType,
KmsKeyId,
FileSystemTypeVersion,
OpenZFSConfiguration,
StorageCapacity,
NetworkType,
region
)
SELECT
'{{ BackupId }}' /* required */,
'{{ ClientRequestToken }}',
'{{ SubnetIds }}' /* required */,
'{{ SecurityGroupIds }}',
'{{ Tags }}',
'{{ WindowsConfiguration }}',
'{{ LustreConfiguration }}',
'{{ StorageType }}',
'{{ KmsKeyId }}',
'{{ FileSystemTypeVersion }}',
'{{ OpenZFSConfiguration }}',
{{ StorageCapacity }},
'{{ NetworkType }}',
'{{ region }}'
RETURNING
file_system
;

DELETE examples

Deletes an Amazon FSx backup. After deletion, the backup no longer exists, and its data is gone. The DeleteBackup call returns instantly. The backup won't show up in later DescribeBackups calls. The data in a deleted backup is also deleted and can't be recovered by any means.

DELETE FROM aws.fsx.backups
WHERE region = '{{ region }}' --required
;