I want to start a restore job for my Amazon FSx recovery point to recover the data that I backed up with AWS Backup.
Resolution
Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.
You can use the AWS Backup console or AWS CLI to restore an Amazon FSx file system.
Use the AWS Backup console
In Use the AWS Backup console to restore Amazon FSx recovery points, choose the tab that's specific to your file system.
Use the AWS CLI
Complete the following steps:
-
Run the list-recovery-points-by-backup-vault command to list all Amazon FSx recovery points in your backup vault:
aws backup list-recovery-points-by-backup-vault \
--backup-vault-name "your-backup-vault-name" \
--by-resource-type "FSx"
Note: replace your-backup-vault-name with the name of your backup vault.
-
Run the describe-recovery-point command to get details about a specific recovery point:
aws backup describe-recovery-point \
--backup-vault-name "your-backup-vault-name" \
--recovery-point-arn "your-recovery-point-arn"
Note: replace your-backup-vault-name with the name of your backup and your-recovery-point-arn with your recovery point's Amazon Resource Name (ARN).
-
Run the get-recovery-point-restore-metadata command to get the restore metadata:
aws backup get-recovery-point-restore-metadata \
--backup-vault-name "your-backup-vault-name" \
--recovery-point-arn "your-recovery-point-arn"
Note: replace your-backup-vault-name with the name of your backup and your-recovery-point-arn with your recovery point's ARN.
-
Copy the restore metadata from the preceding command, and edit it to include only the following metadata fields:
{
"StorageType": "SSD",
"KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/123456a-123b-123c-defg-1h2i2345678",
"StorageCapacity": "1200",
"VpcId": "vpc-0ab0979fa431ad326",
"FileSystemType": "LUSTRE",
"LustreConfiguration": {
"WeeklyMaintenanceStartTime": "4:10:30",
"DeploymentType": "PERSISTENT_1",
"PerUnitStorageThroughput": 50,
"CopyTagsToBackups": true
},
"FileSystemId": "fs-0ca11fb3d218a35c2",
"SubnetIds": [
"subnet-0e66e94eb43235351"
]
}
Note: Replace the example values with your values. The metadata values vary depending on your Amazon FSx file system configuration.
-
Run the start-restore-job command and include your Amazon FSx file system metadata.
The following example start-restore-job command is for Amazon FSx for Windows File Server:
aws backup start-restore-job \
--recovery-point-arn "arn:aws:backup:region:account:recovery-point:id" \
--iam-role-arn "arn:aws:iam::account:role/service-role/AWSBackupDefaultServiceRole" \
--resource-type "FSx" \
--metadata '{
"SubnetIds": ["subnet-12345678"],
"StorageType": "SSD",
"SecurityGroupIds": ["sg-12345678"],
"WindowsConfiguration": {
"DeploymentType": "MULTI_AZ_1",
"ThroughputCapacity": "32"
}
}'
Note: For information about restore metadata for other Amazon FSx file systems, see Use the AWS Backup API, CLI, or SDK to restore Amazon FSx recovery points.
-
Run the describe-restore-job command to monitor the restore status:
aws backup describe-restore-job \
--restore-job-id "your-restore-job-id" \
--region "your-region"
Note: replace your-restore-job-id with your restore job's ID and your-region with your AWS Region.