'How can I transfer files from AWS EC2 instance to another instance?
I have an instance in AWS EC2 and I want to create another one, so I want to transfer some files from the old one to the new one, how can I do that?
Solution 1:[1]
If data is not large, just create new one and use rsync. If data is too large to expensive to transfer and in the same region, just move data to ebs and mount it in the new one.
Solution 2:[2]
In similar situation, I added a new EBS large enough for data I wanted to copy, attached that as a volume to Source Instance, used RDP to remote to it and then copied the files to the EBS volume I had added.
Now you can detach the volume from your Source Instance, attach it to your Destination and then you can copy your files to the Destination.
If the attached EBS volume is not showing up automatically, use
Start > Run > diskmgmt.msc
Find your Volume in the bottom pane, right-click, and mark Online.
Solution 3:[3]
I have not tried these directions (below) yet, but they seem to answer the question:
http://blog.e-zest.com/how-to-do-scp-from-one-ec2-instance-to-another-ec2-instance/
I only had a couple files to transfer so I got lazy 'n' used Filezilla.. not optimal, hope the above works (sorry for not testing it before re-posting).
Solution 4:[4]
If those two instances are in the same AWS account, you can take the backup in the s3 bucket and then move the data from s3 bucket to the target instance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | qrtt1 |
| Solution 2 | |
| Solution 3 | |
| Solution 4 | Suraj Joshi |
