Configuring Amazon DataSync transfers with an NFS file server - Amazon DataSync
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Configuring Amazon DataSync transfers with an NFS file server

To transfer data to or from your Network File System (NFS) file server, you must create an Amazon DataSync transfer location. DataSync can use this location as a source or destination for transferring data.

Accessing NFS file servers

To access your NFS file server, you need a DataSync agent. The agent mounts an export on your file server by using the NFS protocol.

Configuring your NFS export

The export that DataSync needs for your transfer depends on if your NFS file server is a source or destination location and how your file server's permissions are configured.

If your file server is a source location, DataSync just has to read and traverse your files and folders. If it's a destination location, DataSync needs root access to write to the location and set ownership, permissions, and other metadata on the files and folders that you're copying. You can use the no_root_squash option to allow root access for your export.

The following examples describe how to configure an NFS export that provides access to DataSync.

When your NFS file server is a source location (root access)

Configure your export by using the following command, which provides DataSync read-only permissions (ro) and root access ( no_root_squash):

export-path datasync-agent-ip-address(ro,no_root_squash)
When your NFS file server is a destination location

Configure your export by using the following command, which provides DataSync write permissions (rw) and root access ( no_root_squash):

export-path datasync-agent-ip-address(rw,no_root_squash)
When your NFS file server is a source location (no root access)

Configure your export by using the following command, which specifies the POSIX user ID (UID) and group ID (GID) that you know would provide DataSync read-only permissions on the export:

export-path datasync-agent-ip-address(ro,all_squash,anonuid=uid,anongid=gid)

Configuring your network

Your must allow network traffic on port 2049 from your DataSync agent to your NFS file server.

Other NFS clients in your network should be able to mount the NFS export that you're using to transfer data. The export must also be accessible without Kerberos authentication.

Supported NFS versions

By default, DataSync uses NFS version 4.1. DataSync also supports NFS 3.x and 4.0.

Creating your NFS transfer location

Before you begin, note the following:

  • You need an NFS file server that you want to transfer data from.

  • You need a DataSync agent that can access your file server.

  • DataSync doesn't support copying NFS version 4 access control lists (ACLs).

To create an NFS location by using the console
  1. Open the Amazon DataSync console at https://console.amazonaws.cn/datasync/.

  2. In the left navigation pane, expand Data transfer, then choose Locations and Create location.

  3. For Location type, choose Network File System (NFS).

  4. For Agents, choose the DataSync agent that you want to connect to your NFS file server.

    You can choose more than one agent. For more information, see Using multiple Amazon DataSync agents for transfers.

  5. For NFS server, enter the Domain Name System (DNS) name or IP address of the NFS file server that your DataSync agent connects to.

  6. For Mount path, enter the NFS export path that you want DataSync to mount.

    This path (or a subdirectory of the path) is where DataSync transfers data to or from. For more information, see Configuring your NFS export.

  7. (Optional) Expand Additional settings and choose a specific NFS version for DataSync to use when accessing your file server.

    For more information, see Supported NFS versions.

  8. (Optional) Choose Add tag to tag your NFS location.

    Tags are key-value pairs that help you manage, filter, and search for your locations. We recommend creating at least a name tag for your location.

  9. Choose Create location.