Need help?

Our experts have had an average response time of 11.7 minutes in August 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Tips To Restore EFS File System From AWS Backup

by | Sep 7, 2021

Looking for ways to restore EFS file system from AWS Backup? Bobcares is here to assist you!

Recently one of our customers ran into trouble when they attempted to use the AWS CLI to restore an Amazon Elastic File System from an AWS Backup recovery point. Read on to find out how our Support Techs resolved this issue. Contact our AWS Assistance services for help with any AWS queries.

How to Restore EFS File System from AWS Backup

If you are seeking a way to use the AWS Command Line Interface to restore an Amazon EFS from an AWS Backup recovery point, you have come to the right place! Let’s take a quick peek at the advice offered by the experienced experts at Bobcares.

In-place Restoration of EFS File System From an AWS Backup Recovery Point

  1. First, get the ARN or Amazon Resource Name of the EFS file system that has to be restored by using the list-backup-jobs command. You need to have the resource ARN in order to restore an EFS file system from an AWS Backup Recovery Point.
$ aws backup list-backup-jobs --by-resource-type EFS --region us-east-1
  1. Then note the ResourceArn in the command output:
{
    "BackupJobs": [
        {
            "CompletionDate": 1584448253.579, 
            "BackupVaultArn": "arn:aws:backup:us-east-1:111222333444:backup-vault:Default", 
            "PercentDone": "0.0", 
            "RecoveryPointArn": "arn:aws:backup:us-east-1:111222333444:recovery-point:f28fe55c-8f34-4877-9ae6-9c6d5dce8935", 
            "ResourceType": "EFS", 
            "BackupSizeInBytes": 73, 
            "State": "COMPLETED", 
            "IamRoleArn": "arn:aws:iam::111222333444:role/service-role/AWSBackupDefaultServiceRole", 
            "ResourceArn": "arn:aws:elasticfilesystem:us-east-1:111222333444:file-system/fs-c1234567", 
            "BackupJobId": "12ddf0b1-aed4-44ec-894f-0d74448949bd", 
            "StartBy": 1583451934.889, 
            "CreationDate": 1583448334.889, 
            "BackupVaultName": "Default"
        }, 
        {
            "CompletionDate": 1584305453.7, 
            "BackupVaultArn": "arn:aws:backup:us-east-1:111222333444:backup-vault:Default", 
            "PercentDone": "0.0", 
            "RecoveryPointArn": "arn:aws:backup:us-east-1:111222333444:recovery-point:09e9dafe-44a6-471a-b4e8-64c98219a480", 
            "ResourceType": "EFS", 
            "BackupSizeInBytes": 73, 
            "State": "COMPLETED", 
            "IamRoleArn": "arn:aws:iam::111222333444:role/service-role/AWSBackupDefaultServiceRole", 
            "ResourceArn": "arn:aws:elasticfilesystem:us-east-1:111222333444:file-system/fs-gd1b761d", 
            "BackupJobId": "721ba96d-a656-4771-a1f4-78bcd0c930f8", 
            "StartBy": 1583309035.684, 
            "CreationDate": 1583305435.684, 
            "BackupVaultName": "Default"
        }
    ]
}
  1. After that, use the start-restore-job command. Define specific metadata for restoring an EFS instance as parameters within a command or as a seperate JSON file. Create a similar JSON file as seen below to define metadata:
{"file-system-id": "fs-c1234567", "newFileSystem": "false", "Encrypted": "false", "PerformanceMode":"generalPurpose"}

Next, run the command start-restore-job

aws backup start-restore-job --region us-east-1 --recovery-point-arn "arn:aws:backup:us-east-1:111222333444:recovery-point:123e4567-6cd9-464e-bb6b-13f70e79d347" --iam-role-arn "arn:aws:iam::111222333444:role/service-role/AWSBackupDefaultServiceRole"  --metadata file://<path to json file>

Run the following command in the same format to define the parameters:

aws backup start-restore-job --region us-east-1 --recovery-point-arn "arn:aws:backup:us-east-1:111222333444:recovery-point:123e4567-6cd9-464e-bb6b-13f70e79d347" --iam-role-arn "arn:aws:iam::111222333444:role/service-role/AWSBackupDefaultServiceRole" --metadata '{"file-system-id": "fs-c1234567", "newFileSystem": "false", "Encrypted": "false", "PerformanceMode":"generalPurpose"}'

Restoration of New EFS File System from an AWS Backup Recovery Point

  1. Use the list-backup-jobs command to obtain the ARN of the to-be-restored EFS file system. Our Support Techs would like to remind you that you need to have the resource ARN in order to perform the restoration of the EFS file system from an AWS Backup Recoverypoint.
$ aws backup list-backup-jobs --by-resource-type EFS --region us-east-1
  1. Note the ResourceArn in the command output: 
{
    "BackupJobs": [
        {
            "CompletionDate": 1584448353.589, 
            "BackupVaultArn": "arn:aws:backup:us-east-1:111222333444:backup-vault:Default", 
            "PercentDone": "0.0", 
            "RecoveryPointArn": "arn:aws:backup:us-east-1:111222333444:recovery-point:f29fe56c-8f44-4877-9ae6-9c6d5dce8935", 
            "ResourceType": "EFS", 
            "BackupSizeInBytes": 73, 
            "State": "COMPLETED", 
            "IamRoleArn": "arn:aws:iam::111222333444:role/service-role/AWSBackupDefaultServiceRole", 
            "ResourceArn": "arn:aws:elasticfilesystem:us-east-1:111222333444:file-system/fs-c1234567", 
            "BackupJobId": "12ddf0b1-aed4-44ec-894f-0d74448949bd", 
            "StartBy": 1584451934.889, 
            "CreationDate": 1584448334.889, 
            "BackupVaultName": "Default"
        }, 
        {
            "CompletionDate": 1583305453.7, 
            "BackupVaultArn": "arn:aws:backup:us-east-1:111222333444:backup-vault:Default", 
            "PercentDone": "0.0", 
            "RecoveryPointArn": "arn:aws:backup:us-east-1:111222333444:recovery-point:09e9dafe-44a6-471a-b4e8-64c98219a480", 
            "ResourceType": "EFS", 
            "BackupSizeInBytes": 73, 
            "State": "COMPLETED", 
            "IamRoleArn": "arn:aws:iam::111222333444:role/service-role/AWSBackupDefaultServiceRole", 
            "ResourceArn": "arn:aws:elasticfilesystem:us-east-1:111222333444:file-system/fs-gd1b761d", 
            "BackupJobId": "721ba96d-a656-4771-a1f4-78bcd0c930f8", 
            "StartBy": 1583309035.684, 
            "CreationDate": 1583305435.684, 
            "BackupVaultName": "Default"
        }
    ]
}
  1.  Generate a CreationToken to restore the new EFS file system. This will enforce the uniqueness of the request. You can choose a value as the CreationToken. Run the uuid command on a Linux operating system to generate a unique identifier.
uuid -r

You will obtain a similar output as seen:

d0c12345-678d-4071-bf30-8e7e54ab65df
  1. The next step is to run the start-restore-job command. Define metadata in a seprate JSON file or as parameters within the command. Create a seperate JSON file as seen below to define metadate:
{"file-system-id": "fs-c1234567", "Encrypted": "false", "PerformanceMode": "generalPurpose", "CreationToken": "d0c12345-678d-4071-bf30-8e7e54ab65df", "newFileSystem": "true"}

Remember to replace CreationToken with the unique value generated in the previous step.
After this, run the start-restore-job command:

aws backup start-restore-job --region us-east-1 --recovery-point-arn "arn:aws:backup:us-east-1:111222333444:recovery-point:123e4567-6cd9-464e-bb6b-13f70e79d347" --iam-role-arn "arn:aws:iam::111222333444:role/service-role/AWSBackupDefaultServiceRole"  --metadata file://<path to json file>

Remember to enter the JSON file created earlier in place of –metadata.
Run the following command to define metadata as parameters within the start-restore-job command;

aws backup start-restore-job --region us-east-1 --recovery-point-arn "arn:aws:backup:us-east-1:111222333444:recovery-point:123e4567-6cd9-464e-bb6b-13f70e79d347" --iam-role-arn "arn:aws:iam::111222333444:role/service-role/AWSBackupDefaultServiceRole"  --metadata file://<path to json file>

Run the following commands and define the parameters within the start-restore-job command, run the command in the following format:

aws backup start-restore-job --region us-east-1 --recovery-point-arn "arn:aws:backup:us-east-1:111222333444:recovery-point:123e4567-6cd9-464e-bb6b-13f70e79d347" --iam-role-arn "arn:aws:iam::111222333444:role/service-role/AWSBackupDefaultServiceRole" --metadata '{"file-system-id": "fs-17dda397", "newFileSystem": "true", "CreationToken": "d0c12345-678d-4071-bf30-8e7e54ab65df", "Encrypted": "false", "PerformanceMode":"generalPurpose"}'

[Need assistance? We are glad to be of service!}

Conclusion

This easy way to restore the EFS file system from AWS Backup comes from our experienced Support Techs at Bobcares.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF