jkollin
jkollin

Reputation: 13

Transfer EBS volume data in one VPC to an EFS in another VPC

I am looking to migrate an application from one vpc to another. Currently, the application's ec2 instances utilize a nfs which I created from another ec2 instance and ebs volumes. These application related instances (web and app) as well as the nfs instance reside in one VPC (Let's call it VPC "A").

My question is how would I go about transferring the ebs data from the existing nfs in VPC "A" into an efs in VPC "B"? Additionally, the rate of data transfer is not relevant, so the file system's performance mode is just defined as general purpose. Thanks!

Upvotes: 0

Views: 3239

Answers (2)

tdensmore
tdensmore

Reputation: 816

Not sure if this answer was technically possible at the time the above answer was given, but a much easier way to achieve a solution providing that the asker did not to run both applications concurrently (ie. duplicate the data instead of just switch the VPC it was available from).

My company was switching to a new VPC, so I merely wanted to make the data available in the new VPC. Rather than copy it to EBS, unmount, remount, copy to EFS, I switched the mount points as described here:

http://docs.aws.amazon.com/efs/latest/ug/manage-fs-access-change-vpc.html

IMO this is much simpler if you don't need to actually duplicate the data.

For backing up the data, AWS has a workflow outlined:

http://docs.aws.amazon.com/efs/latest/ug/efs-backup.html

Upvotes: 1

John Rotenstein
John Rotenstein

Reputation: 269282

It sounds like your requirement is to transfer the contents of an Amazon EBS volume in one VPC to a different VPC. It is unclear whether your NFS server is hosted from EC2+EBS, or whether it is running from Amazon EFS. I'll assume it is EC2+EBS.

A few different options for you (pick one!):

  • Create an AMI: Create an AMI of the Amazon EC2 instance running the server. Then launch a new instance in VPC B using that AMI.
  • Move the disk: Turn off the EC2 instance. Detach the EBS volume, the attach it to a different instance running in VPC B. Configure as necessary.
  • Use an EBS Snapshot: Snapshot the EBS volume that holds the data, create a new EBS volume from the snapshot (in the desired AZ), attach the EBS volume to the EC2 instance in VPC B.

However, if your server is running on Amazon Elastic File System (EFS), then you would need to copy the data to an EBS volume, detach the volume and attach it to an instance in the VPC B, then copy the data from the EBS volume to a new EFS share in VPC B.

Upvotes: 0

Related Questions