<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DataSync &#8211; Blog of Kliment Andreev &#8211; A place so I won&#039;t forget things</title>
	<atom:link href="https://blog.andreev.it/tag/datasync/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.andreev.it</link>
	<description></description>
	<lastBuildDate>Sun, 25 Oct 2020 19:23:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>AWS: DataSync using VPN and Internet</title>
		<link>https://blog.andreev.it/2020/10/aws-datasync-using-vpn-and-internet/</link>
					<comments>https://blog.andreev.it/2020/10/aws-datasync-using-vpn-and-internet/#respond</comments>
		
		<dc:creator><![CDATA[Kliment Andreev]]></dc:creator>
		<pubDate>Sun, 04 Oct 2020 14:54:06 +0000</pubDate>
				<category><![CDATA[AWS]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[DataSync]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[VPN]]></category>
		<guid isPermaLink="false">https://blog.andreev.it/?p=7308</guid>

					<description><![CDATA[In this post I&#8217;ll explain how to use AWS DataSync service. Per AWS, AWS&#8230;]]></description>
										<content:encoded><![CDATA[<div id="bsf_rt_marker"></div><p>In this post I&#8217;ll explain how to use AWS DataSync service. Per AWS, <em>AWS DataSync makes it simple and fast to move large amounts of data online between on-premises storage and Amazon S3, Amazon Elastic File System (Amazon EFS), or Amazon FSx for Windows File Server.</em><br />
You can used this service when you migrate your on-prem shares to Win FSx or EFS. In my case, I&#8217;ll migrate a Windows share that I have at home to an S3 bucket. In the first scenario, I&#8217;ll use the straight public Internet to migrate data and the second scenario, I&#8217;ll use a VPN connection. The config for VPN transfer is pretty much what you&#8217;ll have if you use Direct Connect instead. In both cases you&#8217;ll need a VM instance on-prem. I have a vCenter running, so I&#8217;ll download an OVA file from AWS, but they also offer VMs for KVM, Hyper-V even EC2. </p>
<h1>Install a VM</h1>
<p>No matter if you use public Internet or VPN/Direct Connect, you&#8217;ll need an on-prem VM that will act as a proxy between your on-prem data and AWS. There is no need to install any agents on any servers. For example, I&#8217;ll have a Windows share and the only thing this VM requires is access to that share with a domain or a workgroup user. Go to AWS DataSync service and click to download the image for your hypervisor.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-01.jpg"><img fetchpriority="high" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-01.jpg" alt="" width="717" height="253" class="aligncenter size-full wp-image-7312" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-01.jpg 717w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-01-300x106.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-01-585x206.jpg 585w" sizes="(max-width: 717px) 100vw, 717px" /></a><br />
The OVA file is about 600+ MBs compressed. Once downloaded, deploy it as with any OVA file. Specify the details for your vCenter, network, host, cluster&#8230; By default, the VM needs 80GB disk and eats up 4CPUs and 16GB RAM. Once deployed, open the console, log with <em>admin/password</em> which is <strong>admin </strong>and <strong>password </strong>and change the IP to static if you need and/or change the default password or whatever you want. The console looks like this, some modified Linux distro.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-02.jpg"><img decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-02.jpg" alt="" width="713" height="355" class="aligncenter size-full wp-image-7313" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-02.jpg 713w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-02-300x149.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-02-585x291.jpg 585w" sizes="(max-width: 713px) 100vw, 713px" /></a></p>
<h1>AWS DataSync over public Internet</h1>
<p>Now, go back to AWS DataSync and enter the IP of the appliance. But before you click <strong>Get key</strong>, make sure you have selected the <strong>public service endpoint</strong> for the <strong>Service endpoint</strong> as in the screenshot below. This means we&#8217;ll use public Internet. No, worries, the traffic is encrypted. Click <strong>Get key</strong>.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-03.jpg"><img decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-03.jpg" alt="" width="1155" height="532" class="aligncenter size-full wp-image-7314" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-03.jpg 1155w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-03-300x138.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-03-1024x472.jpg 1024w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-03-768x354.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-03-585x269.jpg 585w" sizes="(max-width: 1155px) 100vw, 1155px" /></a><br />
Probably you wonder, wait &#8211; how can AWS access my internal IP when I don&#8217;t have any VPN or Direct Connect. Well, AWS doesn&#8217;t care about your internal IP. Your browser have access to the internal IP on port 80 to the VM appliance. AWS doesn&#8217;t initiate the traffic, the appliance does.<br />
So, you have the appliance activated now. Name the agent and tag it if you want. Click <strong>Create agent</strong>.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-04.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-04.jpg" alt="" width="1109" height="604" class="aligncenter size-full wp-image-7315" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-04.jpg 1109w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-04-300x163.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-04-1024x558.jpg 1024w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-04-768x418.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-04-585x319.jpg 585w" sizes="(max-width: 1109px) 100vw, 1109px" /></a></p>
<h2>Creating a task</h2>
<p>You&#8217;ll see you agent online. Click on the <strong>Agent ID</strong>.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-05.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-05.jpg" alt="" width="1589" height="285" class="aligncenter size-full wp-image-7317" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-05.jpg 1589w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-05-300x54.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-05-1024x184.jpg 1024w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-05-768x138.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-05-1536x275.jpg 1536w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-05-1170x210.jpg 1170w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-05-585x105.jpg 585w" sizes="(max-width: 1589px) 100vw, 1589px" /></a><br />
Now, you have to create a task. For each share, you need a task. Click on <strong>Create task</strong>.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-06.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-06.jpg" alt="" width="1576" height="684" class="aligncenter size-full wp-image-7318" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-06.jpg 1576w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-06-300x130.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-06-1024x444.jpg 1024w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-06-768x333.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-06-1536x667.jpg 1536w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-06-1170x508.jpg 1170w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-06-585x254.jpg 585w" sizes="(max-width: 1576px) 100vw, 1576px" /></a><br />
Configure the source location on-prem.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-07.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-07.jpg" alt="" width="860" height="592" class="aligncenter size-full wp-image-7319" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-07.jpg 860w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-07-300x207.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-07-768x529.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-07-585x403.jpg 585w" sizes="(max-width: 860px) 100vw, 860px" /></a><br />
I chose SMB which is a Windows share. Specify the agent, the server IP, the share name with &#8220;/&#8221; prefix and the username, password, domain (optional) in case the share is restricted, which probably is.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-08.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-08.jpg" alt="" width="827" height="527" class="aligncenter size-full wp-image-7320" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-08.jpg 827w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-08-300x191.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-08-768x489.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-08-585x373.jpg 585w" sizes="(max-width: 827px) 100vw, 827px" /></a><br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-09.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-09.jpg" alt="" width="855" height="515" class="aligncenter size-full wp-image-7321" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-09.jpg 855w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-09-300x181.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-09-768x463.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-09-585x352.jpg 585w" sizes="(max-width: 855px) 100vw, 855px" /></a><br />
Click <strong>Next</strong>. Now, choose a destination. I am using some S3 bucket and choose to Autogenerate a role that will allow access to that bucket. Click <strong>Next </strong>again.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-10.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-10.jpg" alt="" width="819" height="832" class="aligncenter size-full wp-image-7322" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-10.jpg 819w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-10-295x300.jpg 295w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-10-768x780.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-10-585x594.jpg 585w" sizes="(max-width: 819px) 100vw, 819px" /></a><br />
On this screen, you can choose options that suit your needs. If you scroll down, you can enable detailed logging in CloudWatch. Click <strong>Next</strong>.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-11.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-11.jpg" alt="" width="798" height="815" class="aligncenter size-full wp-image-7323" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-11.jpg 798w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-11-294x300.jpg 294w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-11-768x784.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-11-585x597.jpg 585w" sizes="(max-width: 798px) 100vw, 798px" /></a><br />
Check if everything is OK and click to <strong>Create task</strong>.<br />
You&#8217;ll see the task creating. It takes about 10-15 secs.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-12.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-12.jpg" alt="" width="385" height="274" class="aligncenter size-full wp-image-7324" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-12.jpg 385w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-12-300x214.jpg 300w" sizes="(max-width: 385px) 100vw, 385px" /></a><br />
Click on <strong>Start </strong>in the upper right corner.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-13.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-13.jpg" alt="" width="1624" height="306" class="aligncenter size-full wp-image-7325" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-13.jpg 1624w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-13-300x57.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-13-1024x193.jpg 1024w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-13-768x145.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-13-1536x289.jpg 1536w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-13-1170x220.jpg 1170w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-13-585x110.jpg 585w" sizes="(max-width: 1624px) 100vw, 1624px" /></a><br />
I put a single 10KB file in my share. After some init work, it took about&#8230; maybe 2-3 mins and the task status said &#8220;available&#8221;. I checked the bucket and it was there. Most likely, if you are migrating a share that&#8217;s changing on a daily basis, you want to schedule the transfer. If you edit the task, you can change the schedule.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-14.jpg"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-14.jpg" alt="" width="820" height="734" class="aligncenter size-full wp-image-7327" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-14.jpg 820w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-14-300x269.jpg 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-14-768x687.jpg 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-14-585x524.jpg 585w" sizes="(max-width: 820px) 100vw, 820px" /></a></p>
<h1>AWS DataSync over VPN and Direct Connect</h1>
<p>For DataSync to work over VPN and Direct Connect, you need a new endpoint and a new appliance. You can&#8217;t use the existing agent and appliance that was configured for public Internet. The endpoint allows you to privately connect to an AWS service. The traffic won&#8217;t go over direct Internet. Actually, with VPN it will, but the traffic will be tunneled. With Direct Connect, the traffic from on-prem to your endpoint is going over dedicated links.<br />
Follow the first section above on how to deploy a new OVA appliance. Once completed, we need to create an endpoint now. But before doing that, create a new security group that allows TCP ports 22, 443 and 1024-1064 range from your appliance.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-20.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-20.png" alt="" width="1141" height="325" class="aligncenter size-full wp-image-7337" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-20.png 1141w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-20-300x85.png 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-20-1024x292.png 1024w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-20-768x219.png 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-20-585x167.png 585w" sizes="(max-width: 1141px) 100vw, 1141px" /></a><br />
In AWS DataSync console, click to create a new agent, but this time choose <strong>VPC endpoints using PrivateLink</strong> and then click on <strong>Create VPC endpoint</strong>.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-15.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-15.png" alt="" width="1051" height="326" class="aligncenter size-full wp-image-7330" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-15.png 1051w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-15-300x93.png 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-15-1024x318.png 1024w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-15-768x238.png 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-15-585x181.png 585w" sizes="(max-width: 1051px) 100vw, 1051px" /></a><br />
I&#8217;ll create a VPC endpoint for DataSync in a VPC that&#8217;s connected to my VPN. I have only one public subnet there and I&#8217;ll choose a security group that allows TCP 443, 1024–1064, and port 22.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-16.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-16.png" alt="" width="1117" height="749" class="aligncenter size-full wp-image-7332" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-16.png 1117w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-16-300x201.png 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-16-1024x687.png 1024w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-16-768x515.png 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-16-585x392.png 585w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-16-263x175.png 263w" sizes="(max-width: 1117px) 100vw, 1117px" /></a><br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-17.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-17.png" alt="" width="1183" height="794" class="aligncenter size-full wp-image-7333" /></a><br />
Click on <strong>Create endpoint</strong>. It takes about 3-5 minutes for the endpoint to be created.<br />
Go back to DataSync screen and you&#8217;ll see the parameters populated. Enter the IP of the VM appliance and click on <strong>Get Key</strong>.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-18.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-18.png" alt="" width="1117" height="781" class="aligncenter size-full wp-image-7340" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-18.png 1117w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-18-300x210.png 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-18-1024x716.png 1024w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-18-768x537.png 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-18-585x409.png 585w" sizes="(max-width: 1117px) 100vw, 1117px" /></a><br />
Once you see the appliance activated, you can create the agent and follow the instructions in <a href="https://blog.andreev.it/?p=7308#Creating_a_task">Creating a task</a> section above.<br />
<strong>NOTE:</strong> I created a task to transfer a 2GB file from my share to S3. When I checked my pfSense IPSec tunnel, I saw these values, which means that the transfer goes over the private link.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2020/10/P152-21.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2020/10/P152-21.png" alt="" width="1127" height="93" class="aligncenter size-full wp-image-7344" srcset="https://blog.andreev.it/wp-content/uploads/2020/10/P152-21.png 1127w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-21-300x25.png 300w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-21-1024x85.png 1024w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-21-768x63.png 768w, https://blog.andreev.it/wp-content/uploads/2020/10/P152-21-585x48.png 585w" sizes="(max-width: 1127px) 100vw, 1127px" /></a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.andreev.it/2020/10/aws-datasync-using-vpn-and-internet/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
