Question

I have two amazon ec2 instances, (1) using SLES and running my current site, and (2) a new one using Amazon Linux. I am simply trying to move my site from the SLES and then retire it.

I have a 100GB EBS volume attached to the SLES server of which only about 20GB is actually used. What's the best way to bring the data over to the new instance?

  • create a new EBS volume of about 30GB and attach to new instance, use unix cp?
  • create a new EBS volume of about 30GB and attach to new instance, temporarily also attach the 100GB original volume the new instance, use unix cp?
  • something smarter/simpler, such as create a snapshot(?) of the 100GB EBS volume, somehow? create a new 30GB EBS volume out of it, and then attach that to the new instance? The extra benefit will be that I won't have to take down my site

Thanks a lot

Was it helpful?

Solution

It is easy to increase the size of a target volume, but the only way you're going to be able to make it smaller is to create a blank volume of the size you want. Then, either mount the new one to the old instance and do a copy or detach the old volume and reattach it to the new and do a copy. Basically, of the options you listed, only the first and second ones would work. The reason making a snapshot won't work is because creating a snapshot from a volume makes the snapshot the same size as the volume it was created from. You would get an error trying to create a volume from snapshot that is smaller than the original.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top