Menu
Amazon Elastic File System
User Guide

Walkthrough 7: Sync Files from an On-Premises File System to Amazon EFS by Using EFS File Sync

This walkthrough shows the steps how to sync files from an on-premises file system to Amazon EFS using EFS File Sync.

Before You Begin

In this walkthrough, we assume the following:

  • You have a Network File System (NFS) file server in your on-premises data center.

  • You have a VMware ESXi Hypervisor host in your on-premises data center.

  • You have created an Amazon EFS file system. If you don't have an Amazon EFS file system, create one now and come back to this walkthrough when you are done. For more information about how to create an Amazon EFS file system, see Getting Started with Amazon Elastic File System.

Step 1: Create a Sync Agent

To create a sync agent, you download a virtual machine (VM) image and deploy it into your on-premises environment so that it can mount your source file system. Once deployed, you activate the agent to securely associate it with your AWS account.

To create a sync agent for on-premises data

  1. Open the Amazon EFS Management Console at https://console.aws.amazon.com/efs/.

  2. Choose File syncs. If you haven't yet used EFS File Sync in this AWS Region, you see an introductory page. Choose Get started to open the Select a host platform page.

    If you have previously used EFS File Sync in this AWS Region, choose Agents from the left navigation, and then choose Create sync agent to open the Select a host platform page.

  3. From the Select host platform page, choose VMware ESXi, and then choose Download image. The virtual machine (VM) image will begin downloading.

  4. When the download completes, deploy the VM to your VMware ESXi hypervisor and, use the VMware client to configure the VM. We recommend a VM with 4 vCPUs, 32 GB of memory, 10 Gigabit networking, and an 80 GB root volume.

  5. Start the VM, and then take note of the VM IP address. This VM must be able to mount your source file system using NFS.

    Note

    Although it's not required, we recommend that you use paravirtualized network controllers for your VMware ESXi VM.

    You don't need to add additional disks to the VM. EFS File Sync uses only the root disk.

  6. On the Amazon EFS Console, choose Next: Connect to agent

  7. For IP address, type the VM's IP address, and then choose Next: Activate agent. Your browser will connect to this IP address to get a unique activation key from your sync agent. This key securely associates your sync agent with your AWS account. This IP address doesn't need to be accessible from outside your network, but must be accessible from your browser.

  8. On the Activate agent page, type a name for your sync agent, and then choose Activate agent.

At this point, you should see your activated sync agent on the Amazon EFS console.

Step 2: Create a Sync Task

Create a sync task and configure the source and destination file systems.

To create a sync task

  1. Choose Create sync task. The Configure source location page appears.

  2. Provide the following information for the source file system:

    • For NFS server, type the domain name or IP address of the source NFS server.

    • For Mount Path, type the mount path for your source file system.

    • For Agent, choose the sync agent that you created earlier.

  3. Choose Next: Configure destination. The Configure destination location page appears.

  4. Provide the following information for the destination file system:

    • For Amazon EFS file system, choose the EFS file system you want to sync to. If you don't have an Amazon EFS file system, create one now and restart this walkthrough when you are done. For more information about how to create an Amazon EFS file system, see Getting Started with Amazon Elastic File System.

    • For File system path, type the path of the file system that you want to write data to. This path must exist in the destination file system.

    • For Security group, choose a security group that allows access to the destination Amazon EFS file system you selected.

  5. Choose Next: Configure settings. The Configure sync settings page appears.

  6. Configure the default settings that you want this sync task to use for synchronizing your files:

    Note

    You can override these settings later when you start a sync task.

    • Choose Ownership (User/Group ID) to copy the user and group IDs from the source files.

    • Choose Permissions to copy the source files permissions.

    • Choose Timestamps to copy time stamps from the source files.

    • Choose File deletion to keep all files in the destination that are not found in the source file system. If this box is cleared, all files in the destination that are not found in the source file system will be deleted.

    • Choose Verification mode to check that the destination file system is an exact copy of the source file system after the sync task completes. If you do not choose this option, only the data that is transferred is verified. Changes made to files while they are being actively transferred and changes made to files that are not actively being transferred, will not be discovered. We recommend choosing full verification.

  7. Choose Next: Review and Create, and then review your sync task settings. When you are ready, choose Create sync task.

Your sync task is created. The status of the task show as Available when the source and destination file systems have been mounted.

The Details tab shows the status and settings for your source and destination file systems.

Step 3: Sync Your Source File System to Amazon EFS

Now that you have a sync task, you can start your sync task to begin syncing files from the source file system to the destination Amazon EFS file system.

To sync the source file system

  1. On the Tasks page, choose the sync task you just created. The Details tab shows the status of your sync task.

  2. In the Actions menu, choose Start.

  3. In the Start sync task dialog box, you can modify the settings for your sync task and choose Start.

  4. Choose Start to start syncing files.

  5. When the sync task starts, the Status column shows the progress of the sync task. As the sync task begins preparation, the status changes from Starting to Preparing. When the task starts to sync files, the status changes from Preparing to Syncing. When file consistency verification starts, the status changes to Verifying. When the sync task is done, the status changes to Success.

Step 4: Access Your Files

To access your files, you connect to the Amazon EFS file system from an Amazon EC2 instance or use AWS Direct Connect.

For information about how to connect using Amazon EC2, see Connect to Your Amazon EC2 Instance and Mount the Amazon EFS File System.

For information about how to connect using AWS Direct Connect, see Walkthrough 5: Create and Mount a File System On-Premises with AWS Direct Connect.

Step 5: Clean Up

If you no longer need the resources you created, you should remove them: