Moving EBS volumes between Amazon EC2 instances

To move data from one instance to another, you can create a snapshot of an existing Amazon Elastic Block Storage (EBS) volume, create a volume from the snapshot, then attach the new volume to a different Amazon EC2 instance.

You can have multiple EBS volumes on the same instance. Or, if you only need to move an existing volume to a new instance (for example, if you are using a newer version of an AMI), you can drop the existing volume on the target instance and attach the volume you have moved.

If you move your enterprise geodatabase (EGDB) default volume (the pgdata folder) from one instance to another, you must make sure the volume on the source instance is mapped to the same drive letter when it is moved to the target instance. By default, this is the D drive.

Creating a snapshot of the volume that contains the data you want to move

Creating a snapshot basically makes a copy of the content of the existing volume.

NoteNote:

If you are making a snapshot of an EGDB volume, you must make a remote desktop connection to the source EGDB instance server and stop the PostgreSQL service before stopping the instance and creating the snapshot.

First, you must stop the instance before you make a snapshot.

Steps:
  1. Log in to Amazon EC2 Management Console.
  2. Click Instances in the Navigation panel.
  3. Right-click the source instance and click Stop.
  4. Now you can make a snapshot of the source volume.

  5. Click Volumes in the Navigation panel.
  6. Right-click the volume you want to move and click Create Snapshot from Volume.
  7. Type a description for your snapshot that will help you find it in the snapshot list.
  8. Click Create.

The target instance

If the target instance has not been created yet, create it now.

Once you have a target instance, record the following information about it:

Creating a volume from the snapshot

You must create a volume from the snapshot you made of your existing volume so you can attach it to the target instance.

Steps:
  1. Click Snapshots in the Navigation panel.
  2. Right-click the snapshot you created from the source volume and click Create Volume from Snapshot.
  3. Specify the size of your new volume.
  4. From the drop-down list, choose the instance zone you recorded for the target instance.
  5. Click Create.
  6. Click Volumes in the Navigation panel.

    You should see your new EBS volume being created. Record the volume ID for future use.

    NoteNote:

    It may take a few minutes to create the volume.

Attaching the new volume to the target instance

You can use the new volume to replace an existing volume or you can add the new volume as an additional volume. If you are replacing an existing volume, there will likely be data on the old volume you need to transfer to the new volume.

For both scenarios, complete the first two sets of steps to attach the volume and make it accessible.

Steps:
  1. Right-click the new EBS volume and click Attach volume.
  2. From the drop-down list, choose the instance ID of the target instance.
  3. Type a name for the new block device.

    All ArcGIS Server and EGDB instances are on Windows servers; therefore, the device name must use one of the Windows device names: xvdf through xvdp. The name must be unique on that instance.

  4. Click Attach.

Connect to the target instance to bring the new volume online after you attach it.

Steps:
  1. Make a remote desktop connection to the target instance.
  2. Open the Microsoft Management Console.
  3. Expand the Storage node and click Disk Management.
  4. Notice that the new volume is offline.
  5. Right-click the disk volume in the Graphical View and click Online.

Now you will either use the newly attached volume as a replacement to your existing volume or you will keep both the existing and the new volume. Read the appropriate section below depending on your situation.

Replacing the existing volume

If you are replacing the existing volume with the new volume, move any data you need from the old to the new volume, then detach the old volume.

Steps:
  1. Start Windows Explorer.
  2. Copy data from the old drive and paste it into the new drive.
  3. Now you can detach the old volume.
  4. Click Volumes in the Navigation panel.
  5. Right-click the volume you want to replace and click Detach.
  6. Click Yes, detach to confirm.
  7. If you replaced an existing EGDB EBS volume, restart the PostgreSQL service by clicking Start > All Programs > PostgreSQL 8.3 > Start service.

If you no longer need the detached volume, delete it.

CautionCaution:

You cannot restore the volume once it is deleted.

Keeping both volumes

If you did not detach the existing volume from the target instance, you may need to remap the volume to a different drive letter. For example, if you have applications that rely on the data being mapped to a particular drive letter, you may need to remap the drive to that specific letter.

NoteNote:

Both the PostgreSQL database cluster for enterprise geodatabase instances and the GIS Data folder for ArcGIS Server instances are mapped to the D drive.

If necessary, remap the volume to a new drive letter.

Steps:
  1. Right-click the disk volume in the Volume List and click Change Drive Letter and Paths.
  2. Click Change on the Change Drive Letter and Paths dialog box.
  3. Choose the new drive letter from the drop-down list and click OK.
  4. Click OK to close the Change Drive Letter and Paths dialog box.
  5. If you are connecting to an EGDB instance, restart the PostgreSQL service by clicking Start > All Programs > PostgreSQL 8.3 > Start service.

You can now work with your data on the new instance.


1/30/2013