{"id":852,"date":"2024-09-30T17:53:00","date_gmt":"2024-09-30T17:53:00","guid":{"rendered":"https:\/\/blog.ngocha.biz\/?p=852"},"modified":"2024-09-30T17:53:00","modified_gmt":"2024-09-30T17:53:00","slug":"transfer-efs-data-datasync","status":"publish","type":"post","link":"https:\/\/blog.ngocha.biz\/?p=852","title":{"rendered":"Transfer EFS data between AWS Accounts Using AWS DataSync"},"content":{"rendered":"<p>In this blog, you will learn how to migrate EFS data from one AWS Account to another using AWS Datasync.<\/p><p>I have given step by step instructions along with screenshots for this guide.<\/p><h2 id=\"efs-to-efs-datasync-workflow\">EFS to EFS DataSync Workflow<\/h2><p>The following image shows the high level workflow of EFS to EFS data transfer using Datasync.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/efs-data-sync-4.gif\" class=\"kg-image\" alt=\"EFS to EFS data migration using DataSync\" loading=\"lazy\" width=\"800\" height=\"1040\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/efs-data-sync-4.gif 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/efs-data-sync-4.gif 800w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>Here is how it works.<\/p><ol><li>DataSync Agent EC2 instance will be created in the source account within the same region and subnet.<\/li><li>The DataSync Agent can access the source EFS via its mount point.<\/li><li>A <a href=\"https:\/\/devopscube.com\/aws-vpc-design\/\">VPC<\/a> Peering connection (cross account) from the source to the destination secures private communication between networks.<\/li><li>A <a href=\"https:\/\/devopscube.com\/aws-client-vpn\/\">VPC Endpoint<\/a> will be created in the destination account for the AWS DataSync Service, enabling secure communication.<\/li><li>The DataSync Agent instance in the source account writes data to the destination EFS account through the VPC Endpoint using ENIs.<\/li><li>AWS DataSync encrypts the data during transfer and allows scheduling and filtering it during migration.<\/li><\/ol><h2 id=\"efs-to-efs-datasync-transfer-steps\">EFS to EFS DataSync Transfer Steps<\/h2><p>Follow the steps given below to setup Datasync for EFS to EFS data transfer.<\/p><h3 id=\"step-1-source-account-elastic-file-system-efs\">Step 1: Source Account Elastic File System (EFS)<\/h3><p>I already have an Elastic File System with data in the source account.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-3-19.png\" class=\"kg-image\" alt=\"source account efs console\" loading=\"lazy\" width=\"1112\" height=\"602\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-3-19.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-3-19.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-3-19.png 1112w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>We can mount this to a server to check the available data in the file system.<\/p><p>I am mounting this EFS to an EC2 instance. For that, we need the <strong>EFS DNS name<\/strong> and other details.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-4-16.png\" class=\"kg-image\" alt=\"source account efs file system general informations. \" loading=\"lazy\" width=\"1025\" height=\"740\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-4-16.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-4-16.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-4-16.png 1025w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>The following window will give the mount command with the File System DNS name.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-5-22.png\" class=\"kg-image\" alt=\"source account efs mount commands with the efs dns name.\" loading=\"lazy\" width=\"1372\" height=\"711\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-5-22.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-5-22.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-5-22.png 1372w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p><a href=\"https:\/\/devopscube.com\/use-aws-cli-create-ec2-instance\/\">Create an EC2 instanc<\/a>e with Amazon Linux AMI, and use the following command to add the Network File System client.<\/p><pre><code>sudo yum install -y amazon-efs-utils<\/code><\/pre><p>Create a directory to mount the File System<\/p><pre><code>mkdir efs<\/code><\/pre><p>Paste the mount command from the above screenshot.<\/p><pre><code>sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport &lt;EFS_DNS_NAME&gt;:\/ efs<\/code><\/pre><p>After mounting the file system, we can view the available data in the <strong>efs<\/strong> directory.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-6-14.png\" class=\"kg-image\" alt=\"source account efs file system connected on an EC2 instance and the available efs data output.\" loading=\"lazy\" width=\"1073\" height=\"874\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-6-14.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-6-14.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-6-14.png 1073w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>Now, we will migrate this data to another EFS situated on another AWS account.<\/p><p>Ensure the EFS has mount points; otherwise, it cannot connect with other services.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-7-21.png\" class=\"kg-image\" alt=\"source account efs mount points.\" loading=\"lazy\" width=\"1553\" height=\"776\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-7-21.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-7-21.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-7-21.png 1553w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h3 id=\"step-2-create-vpcs-in-both-accounts\">Step 2: Create VPCs in Both Accounts<\/h3><p>First, we need to <a href=\"https:\/\/devopscube.com\/terraform-aws-vpc\/\">create a VPC<\/a> in both accounts, and the CIDR values of both VPCs should be different.<\/p><h5 id=\"source-aws-account\">Source AWS Account<\/h5><p>Here, the source account VPC CIDR is <strong>172.16.0.0\/16, <\/strong>and the region I have chosen is <strong>us-west-2<\/strong>.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-1-19.png\" class=\"kg-image\" alt=\"source account virtual private network configurations \" loading=\"lazy\" width=\"1036\" height=\"553\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-1-19.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-1-19.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-1-19.png 1036w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h5 id=\"destination-aws-account\">Destination AWS Account<\/h5><p>For the destination account, I have chosen the <strong>10.0.0.0\/16<\/strong> CIDR VPC, and the region is <strong>us-east-1<\/strong><\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-2-16.png\" class=\"kg-image\" alt=\"destination account virtual private network configurations \" loading=\"lazy\" width=\"960\" height=\"450\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-2-16.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-2-16.png 960w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h3 id=\"step-3-vpc-peering\">Step 3: VPC Peering<\/h3><p>We use the Peering connection method to establish private communication between two different networks.<\/p><h5 id=\"source-account\">Source Account<\/h5><p>First, we must establish the peering connection request from the source VPC.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-8-17.png\" class=\"kg-image\" alt=\"establish vpc peering connection from the source account to the destination account\" loading=\"lazy\" width=\"1257\" height=\"862\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-8-17.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-8-17.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-8-17.png 1257w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>On the next page, provide the required information.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-10-20.png\" class=\"kg-image\" alt=\"aws vpc peering connection configuration to sent peering request to the destination vpc\" loading=\"lazy\" width=\"886\" height=\"848\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-10-20.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-10-20.png 886w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>After creating the peering connection, the request goes to the destination account, so we need to accept the request from the destination account.<\/p><h5 id=\"destination-account\">Destination Account<\/h5><p>The peering connection won&#8217;t be established until the request is accepted.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-51-7.png\" class=\"kg-image\" alt=\"destination account vpc peering console, and the peering informations.\" loading=\"lazy\" width=\"725\" height=\"528\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-51-7.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-51-7.png 725w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h3 id=\"step-4-update-route-table\">Step 4: Update Route Table<\/h3><p>We need to modify both VPC route tables to route the traffic between the two networks via the peering connection.<\/p><h5 id=\"source-account-1\">Source Account<\/h5><p>First, we updated the source account&#8217;s VPC Route Table Rules.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-12-15.png\" class=\"kg-image\" alt=\"source account route table and the routing rules \" loading=\"lazy\" width=\"988\" height=\"622\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-12-15.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-12-15.png 988w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>Edit routes to add new routes. For the new route, the <strong>Destination<\/strong> is the destination VPC CIDR <code>10.0.0.0\/16<\/code> , and the <strong>Target<\/strong> is the Peering Connection.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-14-22.png\" class=\"kg-image\" alt=\"source account modified route table with the peering connection rule.\" loading=\"lazy\" width=\"973\" height=\"670\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-14-22.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-14-22.png 973w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h5 id=\"destination-account-1\">Destination Account<\/h5><p>We update the destination account&#8217;s route table with the source VPC details.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-15-14.png\" class=\"kg-image\" alt=\"destination account modified route table with the peering connection rule.\" loading=\"lazy\" width=\"1112\" height=\"585\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-15-14.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-15-14.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-15-14.png 1112w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h3 id=\"step-5-install-datasync-agent-instance\">Step 5: Install Datasync Agent Instance<\/h3><p>We need to create a Datasync AWS EC2 Agent instance in the source account.<\/p><p>The DataSync Agent instance should be in the same region and network as the source EFS to effectively read the data and reduce latency.<\/p><h5 id=\"source-account-2\">Source Account<\/h5><p>To transfer data between EFS systems, we need a data transfer agent so that the agent can get the data from the source and store it in the destination file system.<\/p><p>To get the AMI of the DataSync Agent, use the following command.<\/p><p>You can use the cloud shell to run this command.<\/p><pre><code>aws ssm get-parameter --name \/aws\/service\/datasync\/ami --region us-west-2<\/code><\/pre><p>From the output, we can get the DataSync Agent AMI ID.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-16-18.png\" class=\"kg-image\" alt=\"get the aws datasync agent ami from the cloud shell \" loading=\"lazy\" width=\"671\" height=\"278\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-16-18.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-16-18.png 671w\"><\/figure><p>Create an EC2 instance using this AMI ID.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-17-14.png\" class=\"kg-image\" alt=\"Datasync agent creation with the Datasync agent instance ami\" loading=\"lazy\" width=\"826\" height=\"780\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-17-14.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-17-14.png 826w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>The AMI will be available in the community AMI&#8217;s section.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-18-20.png\" class=\"kg-image\" alt=\"filter the datasync agent ami from the commnity ami section\" loading=\"lazy\" width=\"1207\" height=\"764\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-18-20.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-18-20.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-18-20.png 1207w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><blockquote>Note: The DataSync Agent should be created in the same network as the Source EFS to ensure it can access the EFS.<\/blockquote><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-19-13.png\" class=\"kg-image\" alt=\"dayasync aws instance informations from the console.\" loading=\"lazy\" width=\"1167\" height=\"708\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-19-13.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-19-13.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-19-13.png 1167w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h3 id=\"step-6-create-a-vpc-endpoint-in-the-destination-account\">Step 6: Create a VPC Endpoint in the Destination Account<\/h3><p>We need a <strong>private VPC endpoint<\/strong> in the destination account to transfer data securely to an AWS service.<\/p><h5 id=\"destination-account-2\">Destination Account<\/h5><p>Navigate to the VPC dashboard and select the &#8220;<strong>Endpoints<\/strong>&#8221; tab.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-20-17.png\" class=\"kg-image\" alt=\"creation of the vpc endpoint from the source account vpc\" loading=\"lazy\" width=\"965\" height=\"612\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-20-17.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-20-17.png 965w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>In the next window, we need to choose the <strong>Service category<\/strong> as &#8220;<strong>AWS Service<\/strong>&#8221; because we are using this for internal service communication.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-21-12.png\" class=\"kg-image\" alt=\"selecting aws services for the creation of the vpc endpoint \" loading=\"lazy\" width=\"932\" height=\"607\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-21-12.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-21-12.png 932w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>In the following section, select the <strong>AWS Service, destination VPC, Subnets, and Security group<\/strong> to attach to the VPC endpoint.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-22-14.png\" class=\"kg-image\" alt=\"choosing the datasync service to create the vpc endpoint on the souce account\" loading=\"lazy\" width=\"1169\" height=\"774\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-22-14.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-22-14.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-22-14.png 1169w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-23-12.png\" class=\"kg-image\" alt=\"select security group and ip address type for the creation of the vpc endpoint for the datasync service. \" loading=\"lazy\" width=\"1152\" height=\"606\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-23-12.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-23-12.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-23-12.png 1152w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h3 id=\"step-7-setup-datasync-in-destination\">Step 7: Setup DataSync in Destination<\/h3><p>In the destination account, we need to set up the <strong>DataSync Agent<\/strong> with the <strong>VPC Endpoint<\/strong> and create <strong>source and destination locations<\/strong> with that Agent to perform the data sync between accounts.<\/p><h5 id=\"prerequisite\">Prerequisite<\/h5><p>We need the <strong>IP address<\/strong> of the <strong>source account DataSync Agent instances<\/strong> for AWS DataSync activation.<\/p><h5 id=\"source-account-3\">Source Account<\/h5><p>If your browser can access the Private IP of the Source DataSync Instance, you can use it to activate it. Otherwise, you use the public IP of the instance for the activation.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-27-12.png\" class=\"kg-image\" alt=\"aws datasync agent instance details on the dashboard \" loading=\"lazy\" width=\"1212\" height=\"680\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-27-12.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-27-12.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-27-12.png 1212w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><blockquote><strong>Note: <\/strong>If you haven&#8217;t establised a VPN connection, you cannot use the Private IP for DataSync Agent activation.<\/blockquote><p>Refer to this blog to learn how to set up the <a href=\"https:\/\/devopscube.com\/aws-client-vpn\/\" rel=\"noreferrer noopener\">AWS Client VPN<\/a>.<\/p><h5 id=\"destination-account-3\">Destination Account<\/h5><p>Open the <strong>AWS DataSync<\/strong> Service from the destination account.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-24-12.png\" class=\"kg-image\" alt=\"creation and configuration of the aws datasynce service from the source account \" loading=\"lazy\" width=\"1150\" height=\"640\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-24-12.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-24-12.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-24-12.png 1150w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>In the next window, choose the &#8216;<strong>Deploy agent<\/strong> as <strong>Amazon EC2<\/strong>&#8216;, because our agent runs in the source as an EC2 instance.<\/p><p>In the &#8216;<strong>Service endpoint<\/strong>&#8216; section, select the VPC Endpoint we created in the previous steps.<\/p><p>The endpoint type should be<strong> VPC endpoints using AWS PrivateLink. <\/strong>We also need to select the <strong>VPC, Subnet, and security group.<\/strong><\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-26-12.png\" class=\"kg-image\" alt=\"setup the hpervisor, endpoint type, endpoint, subnet and seurity group for the setup of the aws datasync\" loading=\"lazy\" width=\"1790\" height=\"1566\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-26-12.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-26-12.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/03\/image-26-12.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-26-12.png 1790w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>In the <strong>Activation key<\/strong> section, provide the Public IP of the source DataSync Agent instance.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-28-10.png\" class=\"kg-image\" alt=\"selecting the automatic key activation method for the datasync agent activation.\" loading=\"lazy\" width=\"739\" height=\"405\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-28-10.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-28-10.png 739w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>If you successfully activate the Agent, you will see the following output.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-29-14.png\" class=\"kg-image\" alt=\"datasync agent activation mesaget after the successful activation.\" loading=\"lazy\" width=\"755\" height=\"766\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-29-14.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-29-14.png 755w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>Now, we can create the Agent.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-30-9.png\" class=\"kg-image\" alt=\"setting up the agent name for the datasync configuration.\" loading=\"lazy\" width=\"745\" height=\"432\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-30-9.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-30-9.png 745w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h3 id=\"step-8-create-destination-elastic-file-system-efs\">Step 8: Create Destination Elastic File System (EFS)<\/h3><p>We must create a <strong>destination EFS<\/strong> to migrate data from the source EFS.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-33-8.png\" class=\"kg-image\" alt=\"creation of the efs file system on the destination account for the migration from the source acocunt. \" loading=\"lazy\" width=\"2000\" height=\"919\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-33-8.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-33-8.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/03\/image-33-8.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-33-8.png 2382w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>Provide the destination VPC and Security Group in the settings to create the EFS.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-32-10.png\" class=\"kg-image\" alt=\"destination efs configuration details and the mount points\" loading=\"lazy\" width=\"1331\" height=\"789\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-32-10.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-32-10.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-32-10.png 1331w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h3 id=\"step-9-create-datasync-locations\">Step 9: Create DataSync Locations<\/h3><p>Before creating the locations, we need one of the <strong>Mount Point IPs<\/strong> of the source EFS.<\/p><h5 id=\"source-account-4\">Source Account<\/h5><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-35-12.png\" class=\"kg-image\" alt=\"copying the source efs mount point for the datasync location creation. \" loading=\"lazy\" width=\"1419\" height=\"792\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-35-12.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-35-12.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-35-12.png 1419w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h5 id=\"destination-account-4\">Destination Account<\/h5><p>Now, create a location for the source and destination.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-31-10.png\" class=\"kg-image\" alt=\"create datasync source location to create the datasync task\" loading=\"lazy\" width=\"2000\" height=\"880\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-31-10.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-31-10.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1600\/2025\/03\/image-31-10.png 1600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-31-10.png 2392w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure>\n<!--kg-card-begin: html-->\n<span style=\"margin: 0px;padding: 0px\">First, we need to create a location for the source account<!--kg-card-begin: html--><span style=\"margin: 0px;padding: 0px\">. The&nbsp;<strong>location<\/strong><\/span><!--kg-card-end: html--><strong> type<\/strong>&nbsp;should be NFS because the source EFS is in another account<\/span>\n<!--kg-card-end: html-->\n<figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-36-9.png\" class=\"kg-image\" alt=\"setting up datasync source location with its details such as location type, server address, and mount path\" loading=\"lazy\" width=\"746\" height=\"862\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-36-9.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-36-9.png 746w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>Now, we need to create a location for the destination EFS.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-37-10.png\" class=\"kg-image\" alt=\"setting up datasync destination location with its details such as location type, server address, and mount path\" loading=\"lazy\" width=\"746\" height=\"730\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-37-10.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-37-10.png 746w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h3 id=\"step-10-setup-datasync-task\">Step 10: Setup DataSync Task<\/h3><p>Now, we can set up the DataSync task to perform the migration.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-38-8.png\" class=\"kg-image\" alt=\"setting up the aws datasync task to migrate the data from the source to destination\" loading=\"lazy\" width=\"1051\" height=\"400\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-38-8.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-38-8.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-38-8.png 1051w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>First, we need to configure the source location.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-39-8.png\" class=\"kg-image\" alt=\"provide the source location information to setup the task\" loading=\"lazy\" width=\"1008\" height=\"610\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-39-8.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-39-8.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-39-8.png 1008w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>Then, configure the destination location<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-40-6.png\" class=\"kg-image\" alt=\"provide the destination location information to setup the task\" loading=\"lazy\" width=\"1013\" height=\"637\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-40-6.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-40-6.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-40-6.png 1013w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>Both locations are now configured, and the other configuration settings are performed.<\/p><p>Provide a name for the task. In the &#8216;Source Data Option&#8217; Section, choose between <strong>Everything and Specific files, objects, and folders.<\/strong><\/p><p>I need to transfer all data from the source account to the Destination account, so I am choosing Everything. However, you can exclude specific files, objects, or folders if required.<\/p><p>In the <strong>Transfer Options <\/strong>section, various configurations are available.<\/p><h4 id=\"transfer-mode\"><strong>Transfer Mode<\/strong><\/h4>\n<!--kg-card-begin: html-->\n<ol class=\"wp-block-list is-style-cnvs-list-styled\">\n<li><!--kg-card-begin: html--><span style=\"margin: 0px;padding: 0px\"><strong>Transfer all data:&nbsp;<\/strong>This will not compare the source and destination files; instead, it will directly proceed with copying<\/span><!--kg-card-end: html-->.<\/li>\n\n\n<li><strong>Transfer only changed data:<\/strong> This option will compare the source and destination data before copying them. If any data is changed in the source or the destination doesn&#8217;t have that data, only the copy will happen.<\/li>\n<\/ol>\n<!--kg-card-end: html-->\n<h4 id=\"verification\">Verification<\/h4><ol><li><strong>Verify all data:<\/strong> After transferring the data, verify all the source and destination data and ensure that the source and destination are properly synced.<\/li><li><strong>Verify only transferred data.<\/strong><\/li><li><strong>Don&#8217;t verify data after transferred<\/strong><\/li><\/ol><h4 id=\"bandwidth-limit\">Bandwidth Limit<\/h4><ol><li>By default, DataSync will use a maximum bandwidth limit to transfer the data, but we can limit the bandwidth if required.<\/li><li>We can always keep the files in the destination location even if it is deleted from the source location.<\/li><li>Overwrite the data when the source data has any changes.<\/li><\/ol><h4 id=\"additional-settings\">Additional Settings<\/h4><ol><li>Copy Ownership: User and Group ID<\/li><li>Copy Permissions from the source<\/li><li>Copy Timestamps from the source<\/li><li>Queueing<\/li><\/ol><blockquote>Note: Depends on the configuration, the on premises to AWS data transfer bandwidth can go upto 10 Gbps.<\/blockquote><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-41-7.png\" class=\"kg-image\" alt=\"configuration settings for the datasync task such as source data options and transfer options. \" loading=\"lazy\" width=\"913\" height=\"843\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-41-7.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-41-7.png 913w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>In the <strong>Scheduling<\/strong> section, we can manually trigger the sync or configure it to occur periodically.<\/p><p>In the <strong>Task Repot<\/strong> section, we can create a <strong>standard<\/strong> or <strong>summary only<\/strong> report about the sync and can be stored in an S3 Bucket.<\/p><p>If choosing the Standard Report, you will get more customization options such as s<strong>uccess and errors <\/strong>or <strong>errors only<\/strong> reports for (Transferred, Verified, Deleted, or Skipped)<\/p><p>In the <strong>Logging<\/strong> section, we can send the logs to AWS Cloudwatch.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-42-7.png\" class=\"kg-image\" alt=\"datasync task confuration such as scheduling, task report and logging. \" loading=\"lazy\" width=\"656\" height=\"791\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-42-7.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-42-7.png 656w\"><\/figure><p>The task is ready to perform the sync. We have to start the task.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-44-7.png\" class=\"kg-image\" alt=\"aws datasync task dashboard and the configuration details of the source and destination locations.\" loading=\"lazy\" width=\"1167\" height=\"732\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-44-7.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-44-7.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-44-7.png 1167w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><blockquote>Note: Each AWS DataSync task creates four Elastice Network Interfaces (ENIs) will be created. This will optimize the performance and helps for the fault tolerance.<\/blockquote><h3 id=\"step-11-verify-the-datasync\">Step 11: Verify the DataSync<\/h3><p>We can check the <strong>Task history<\/strong> to verify that the data is properly migrated from the source to the destination account<strong>.<\/strong><\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-47-7.png\" class=\"kg-image\" alt=\"aws datasync task history and execution details of the task\" loading=\"lazy\" width=\"1215\" height=\"435\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-47-7.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-47-7.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-47-7.png 1215w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>In the history, you can see the execution details such as <strong>Execution ID, Start Time, Duration, Status, Transfer Speed, Size, etc.<\/strong>; if we want more information, we can click the execution ID.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-50-9.png\" class=\"kg-image\" alt=\"describe the execution id to get more indepth details of the performed task\" loading=\"lazy\" width=\"945\" height=\"848\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-50-9.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-50-9.png 945w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><p>You can also manually check if all the files have been synced by mounting the destination EFS to an EC2 instance.<\/p><figure class=\"kg-card kg-image-card\"><img decoding=\"async\" src=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-49-5.png\" class=\"kg-image\" alt=\"mount the destination efs to an ec2 instance and check the synced data from the source to the desination. \" loading=\"lazy\" width=\"1228\" height=\"930\" srcset=\"https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w600\/2025\/03\/image-49-5.png 600w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/size\/w1000\/2025\/03\/image-49-5.png 1000w, https:\/\/storage.ghost.io\/c\/5f\/2f\/5f2f4d20-2abf-4534-8d40-7aa233aedd43\/content\/images\/2025\/03\/image-49-5.png 1228w\" sizes=\"auto, (min-width: 720px) 720px\"><\/figure><h2 id=\"conclusion\">Conclusion<\/h2><p>I hope this blog will give you an idea of the AWS DayaSync Workflow and how we can migrate or sync EFS data from one account to another in different regions.<\/p><p>With DayaSync, you can do more configuration and implementation. When you implement it, make sure that the security groups provide only the required network and ports to route the traffic.<\/p>\n<hr><p><strong>Ngu\u1ed3n:<\/strong> <a href=\"https:\/\/devopscube.com\/transfer-efs-data-datasync\/\" target=\"_blank\" rel=\"noopener noreferrer\">Transfer EFS data between AWS Accounts Using AWS DataSync \u2014 DevOpsCube<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>Source: https:\/\/devopscube.com\/transfer-efs-data-datasync\/<\/p>\n","protected":false},"author":1,"featured_media":853,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-852","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=852"}],"version-history":[{"count":0,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/posts\/852\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=\/wp\/v2\/media\/853"}],"wp:attachment":[{"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ngocha.biz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}