How can I back up and restore my Amazon EFS file system?

5 minute read
0

I want to back up my Amazon Elastic File System (Amazon EFS) file system and restore it into a new file system. How can I do this?

Resolution

Note: It's a best practice to back up your EFS file system using AWS Backup to protect your data.

Back up your EFS file system using AWS Backup

  1. Open the AWS Backup console.
  2. (Optional) Configure the services used with AWS Backup:
    On the navigation pane on the left side of the AWS Backup console, under My account, choose Settings.
    On the Service opt-in page, select the Configure resources button.
    On the Configure resources page, use the toggle switches to turn on or turn off the services used with AWS Backup. To back up an EFS file system, turn on EFS and then choose Confirm.
  3. Choose Dashboard. Then, select the Create on-demand backup button.
  4. On the Create on-demand backup page, choose EFS for the Resource Type. Then choose the file system ID of the EFS resource that you want to protect.
  5. In the Backup window section, select Create backup now. This initiates a backup immediately and allows you to see your saved resource sooner on the Protected resources page.
  6. Specify a Transition to cold storage value (if appropriate) and an Expire value.
  7. In the Retention period section, select Days, and then enter the number of days that you want to retain the backups.
  8. In the Backup vault section, select one of the preexisting vaults or choose Create new backup vault. Choosing Create new backup vault opens a new page to create a vault. You're returned to the Create on-demand backup page when you finish creating the vault.
  9. In the IAM role section, choose Default role.
  10. (Optional) To assign one or more tags to your on-demand backup, enter a key and optional value, and then choose Add tag.
  11. Choose Create on-demand backup. The Jobs page opens, showing a list of jobs.
  12. Choose the Backup job ID for the resource that you just backed up. The Status of the backup job changes to Completed when the backup process is done.

For more information, see Getting started 2: Create an on-demand backup.

Additionally, you can create a scheduled backup for your EFS file system. When creating scheduled backups, you assign resources to backup plans. Then, AWS Backup automatically backs up and retains backups for those resources according to the backup plan. For more information, see Getting started 3: Create a scheduled backup.

Restore an EFS file system using AWS Backup

  1. Navigate to the backup vault that you selected in the backup plan. Then, select the latest completed backup. To restore the file system, choose the recovery point ARN, and then select the Restore button.
  2. The Restore backup screen shows the Resource ID and other configurations as follows:
    Resource Type: Choose the Full restore option to restore the file system completely, including all root level folders and files. Choose the Item-level restore option to restore a specific file or directory. You can select and restore up to five items within your Amazon EFS file system.
    Restore Location: To restore to the source file system, choose the Restore to directory in source file system option. To restore to a different file system, choose the Restore to a new file system option.
    File system type: Select Regional. It's a best practice to use this option because it stores the data across multiple Availability Zones.
    Performance: Select General purpose.
    Select Enable encryption if you want to encrypt your file system. Primary key IDs and aliases appear in the list after they're created using the AWS Key Management Service (AWS KMS) console.
    Choose the key that you want to use from the list.
  3. Select Default role and then select the Restore backup button. The job then appears under Restore jobs in the Jobs section of the AWS Backup Console, found on the left navigation pane.
  4. Check for your restored Amazon EFS file system.
    The restored backup job appears under Restore jobs in the AWS Backup console.
    After the job status changes to Completed, open the Amazon EFS console. Then, select File systems on the left navigation pane to see the restored file system.
    You can mount the restored file system on an Amazon Elastic Compute Cloud (Amazon EC2) instance. From the instance, access the files and directories that were restored from the backup of the file system.

Review the backup's performance

The following are AWS Backup rates:

  • 100 MB/s for file systems composed of mostly large files.
  • 500 files/s for file systems composed of mostly small files.
  • The maximum duration for a backup operation in AWS Backup is seven days.

Restore operations take longer than the corresponding backup. Using AWS Backup doesn't consume accumulated burst credits, and doesn't count against the General Purpose mode file operation limits.

For more information regarding AWS Backup consistency, see Using AWS Backup to back up and restore Amazon EFS file systems.


AWS OFFICIAL
AWS OFFICIALUpdated 2 years ago