CreateBackup
Creates a backup of an existing Amazon FSx file system. Creating regular backups for your file system is a best practice, enabling you to restore a file system from a backup if an issue arises with the original file system.
For Amazon FSx for Lustre file systems, you can create a backup only for file systems with the following configuration:
-
a Persistent deployment type
-
is not linked to a data respository.
For more information about backing up Amazon FSx for Lustre file systems, see Working with FSx for Lustre backups.
For more information about backing up Amazon FSx for Windows file systems, see Working with FSx for Windows 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
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.
Request Syntax
{
"ClientRequestToken": "string
",
"FileSystemId": "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) A string of up to 64 ASCII characters that Amazon FSx uses to ensure idempotent creation. This string 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
- FileSystemId
-
The ID of the file system to back up.
Type: String
Length Constraints: Minimum length of 11. Maximum length of 21.
Pattern:
^(fs-[0-9a-f]{8,})$
Required: Yes
- Tags
-
(Optional) The tags to apply to the backup at backup creation. The key value of the
Name
tag appears in the console as the backup name. If you have setCopyTagsToBackups
to true, and you specify one or more tags using theCreateBackup
action, no existing file system tags are copied from the file system to the backup.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"
},
"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",
"ProgressPercent": number,
"ResourceARN": "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.
Errors
For information about the errors that are common to all actions, see Common Errors.
- BackupInProgress
-
Another backup is already under way. Wait for completion before initiating additional backups of this file system.
HTTP Status Code: 400
- BadRequest
-
A generic error indicating a failure with a client request.
HTTP Status Code: 400
- FileSystemNotFound
-
No Amazon FSx file systems were found based upon supplied parameters.
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
- InternalServerError
-
A generic error indicating a server-side failure.
HTTP Status Code: 500
- 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
- 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: