CopyBackup - Amazon FSx

CopyBackup

Copies an existing backup within the same AWS account to another Region (cross-Region copy) or within the same Region (in-Region copy). You can have up to five backup copy requests in progress to a single destination Region per account.

You can use cross-Region backup copies for cross-region disaster recovery. You periodically take backups and copy them to another Region so that in the event of a disaster in the primary Region, you can restore from backup and recover availability quickly in the other Region. You can make cross-Region copies only within your AWS partition.

You can also use backup copies to clone your file data set to another Region or within the same Region.

You can use the SourceRegion parameter to specify the AWS Region from which the backup will be copied. For example, if you make the call from the us-west-1 Region and want to copy a backup from the us-east-2 Region, you specify us-east-2 in the SourceRegion parameter to make a cross-Region copy. If you don't specify a Region, the backup copy is created in the same Region where the request is sent from (in-Region copy).

For more information on creating backup copies, see Copying backups in the Amazon FSx for Windows User Guide and Copying backups in the Amazon FSx for Lustre User Guide.

Request Syntax

{ "ClientRequestToken": "string", "CopyTags": boolean, "KmsKeyId": "string", "SourceBackupId": "string", "SourceRegion": "string", "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ClientRequestToken

(Optional) An idempotency token for resource creation, in a string of up to 64 ASCII characters. This token is automatically filled on your behalf when you use the AWS Command Line Interface (AWS CLI) or an AWS SDK.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Pattern: [A-za-z0-9_.-]{0,63}$

Required: No

CopyTags

A boolean flag indicating whether tags from the source backup should be copied to the backup copy. This value defaults to false.

If you set CopyTags to true and the source backup has existing tags, you can use the Tags parameter to create new tags, provided that the sum of the source backup tags and the new tags doesn't exceed 50. Both sets of tags are merged. If there are tag conflicts (for example, two tags with the same key but different values), the tags created with the Tags parameter take precedence.

Type: Boolean

Required: No

KmsKeyId

The ID of the AWS Key Management Service (AWS KMS) key used to encrypt the file system's data for Amazon FSx for Windows File Server file systems and Amazon FSx for Lustre PERSISTENT_1 file systems at rest. In either case, if not specified, the Amazon FSx managed key is used. The Amazon FSx for Lustre SCRATCH_1 and SCRATCH_2 file systems are always encrypted at rest using Amazon FSx managed keys. For more information, see Encrypt in the AWS Key Management Service API Reference.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Pattern: ^.{1,2048}$

Required: No

SourceBackupId

The ID of the source backup. Specifies the ID of the backup that is being copied.

Type: String

Length Constraints: Minimum length of 12. Maximum length of 128.

Pattern: ^(backup-[0-9a-f]{8,})$

Required: Yes

SourceRegion

The source AWS Region of the backup. Specifies the AWS Region from which the backup is being copied. The source and destination Regions must be in the same AWS partition. If you don't specify a Region, it defaults to the Region where the request is sent from (in-Region copy).

Type: String

Length Constraints: Minimum length of 1. Maximum length of 20.

Pattern: ^[a-z0-9-]{1,20}$

Required: No

Tags

A list of Tag values, with a maximum of 50 elements.

Type: Array of Tag objects

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Required: No

Response Syntax

{ "Backup": { "BackupId": "string", "CreationTime": number, "DirectoryInformation": { "ActiveDirectoryId": "string", "DomainName": "string", "ResourceARN": "string" }, "FailureDetails": { "Message": "string" }, "FileSystem": { "AdministrativeActions": [ { "AdministrativeActionType": "string", "FailureDetails": { "Message": "string" }, "ProgressPercent": number, "RequestTime": number, "Status": "string", "TargetFileSystemValues": "FileSystem" } ], "CreationTime": number, "DNSName": "string", "FailureDetails": { "Message": "string" }, "FileSystemId": "string", "FileSystemType": "string", "KmsKeyId": "string", "Lifecycle": "string", "LustreConfiguration": { "AutomaticBackupRetentionDays": number, "CopyTagsToBackups": boolean, "DailyAutomaticBackupStartTime": "string", "DataRepositoryConfiguration": { "AutoImportPolicy": "string", "ExportPath": "string", "FailureDetails": { "Message": "string" }, "ImportedFileChunkSize": number, "ImportPath": "string", "Lifecycle": "string" }, "DeploymentType": "string", "DriveCacheType": "string", "MountName": "string", "PerUnitStorageThroughput": number, "WeeklyMaintenanceStartTime": "string" }, "NetworkInterfaceIds": [ "string" ], "OwnerId": "string", "ResourceARN": "string", "StorageCapacity": number, "StorageType": "string", "SubnetIds": [ "string" ], "Tags": [ { "Key": "string", "Value": "string" } ], "VpcId": "string", "WindowsConfiguration": { "ActiveDirectoryId": "string", "Aliases": [ { "Lifecycle": "string", "Name": "string" } ], "AutomaticBackupRetentionDays": number, "CopyTagsToBackups": boolean, "DailyAutomaticBackupStartTime": "string", "DeploymentType": "string", "MaintenanceOperationsInProgress": [ "string" ], "PreferredFileServerIp": "string", "PreferredSubnetId": "string", "RemoteAdministrationEndpoint": "string", "SelfManagedActiveDirectoryConfiguration": { "DnsIps": [ "string" ], "DomainName": "string", "FileSystemAdministratorsGroup": "string", "OrganizationalUnitDistinguishedName": "string", "UserName": "string" }, "ThroughputCapacity": number, "WeeklyMaintenanceStartTime": "string" } }, "KmsKeyId": "string", "Lifecycle": "string", "OwnerId": "string", "ProgressPercent": number, "ResourceARN": "string", "SourceBackupId": "string", "SourceBackupRegion": "string", "Tags": [ { "Key": "string", "Value": "string" } ], "Type": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Backup

A backup of an Amazon FSx file system.

Type: Backup object

Errors

For information about the errors that are common to all actions, see Common Errors.

BackupNotFound

No Amazon FSx backups were found based upon the supplied parameters.

HTTP Status Code: 400

BadRequest

A generic error indicating a failure with a client request.

HTTP Status Code: 400

IncompatibleParameterError

The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.

HTTP Status Code: 400

IncompatibleRegionForMultiAZ

Amazon FSx doesn't support Multi-AZ Windows File Server copy backup in the destination Region, so the copied backup can't be restored.

HTTP Status Code: 400

InternalServerError

A generic error indicating a server-side failure.

HTTP Status Code: 500

InvalidDestinationKmsKey

The AWS Key Management Service (AWS KMS) key of the destination backup is invalid.

HTTP Status Code: 400

InvalidRegion

The Region provided for Source Region is invalid or is in a different AWS partition.

HTTP Status Code: 400

InvalidSourceKmsKey

The AWS Key Management Service (AWS KMS) key of the source backup is invalid.

HTTP Status Code: 400

ServiceLimitExceeded

An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting AWS Support.

HTTP Status Code: 400

SourceBackupUnavailable

The request was rejected because the lifecycle status of the source backup is not AVAILABLE.

HTTP Status Code: 400

UnsupportedOperation

The requested operation is not supported for this resource or API.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: