Moving EBS volumes between Amazon Web Services Windows instances

The ArcGIS for Server AMIs use a separate Amazon Elastic Block Storage (EBS) volume for data storage. Therefore, the ArcGIS and database management system (DBMS) software are stored in a different location from the data, and you can move data from one instance to another by creating a snapshot of an existing EBS volume, creating a volume from the snapshot, then attaching the new volume to a different ArcGIS Server on Amazon Web Services site.

You would do this if you want to move your existing data and services to a site created from a newer ArcGIS for Server AMI, or you want to have multiple sites with the same data.

The following workflow explains how to move a volume from one Windows ArcGIS Server on Amazon Web Services site to another.

Guidelines for moving EBS volumes

Be aware of the following when moving volumes between Windows instances:

Preparing the source volume

Before you can create a snapshot of the volume, you must stop your services, stop ArcGIS for Server, detach SQL Server databases (if using them), unmount the volume, and stop the existing ArcGIS Server on Amazon Web Services site.

Steps:
  1. In ArcGIS Server Manager or ArcGIS for Desktop, stop all services running on your GIS server.
  2. Make a remote desktop connection to the source instance.
  3. Stop ArcGIS for Server.
    1. Open the Windows Services dialog box.
    2. Right-click ArcGIS Server in the Services list and click Stop.
  4. If you have geodatabases in SQL Server, detach them.
    • If your site is licensed with an ArcGIS for Server Enterprise license, use SQL Server Management Studio to detach the databases.
    • If your site is licensed with an ArcGIS for Server Workgroup license, use ArcGIS for Desktop to detach the geodatabases from the database server.
      NoteNote:

      ArcGIS for Desktop must be licensed for you to use it.

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

Once the source instance is ready, create a snapshot of the volume you want to move. Creating a snapshot basically makes a copy of the content of the existing volume.

Steps:
  1. Log in to the Amazon Web Services Management Console.
  2. Click the EC2 link and display the page corresponding to your Amazon region.
  3. Click Volumes.
  4. Right-click the volume you want to move and click Create Snapshot.
  5. Type a name and description for your snapshot that will help you find it in the snapshot list.
  6. Click Yes, 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:

Block device names must be unique, so when you attach the new volume to the target site, be sure to give it a different name from the existing one.

By default, the ArcGIS for Server AMIs use xvdg for the EBS volume name.

Creating a volume from the snapshot

You must create a volume from the snapshot you made of your source volume so you can attach it to the target site. The volume you create can be the same size or larger than the original volume, but not smaller. Do the following in the Amazon Web Services Management Console to create a new volume from the snapshot:

Steps:
  1. Navigate to the EC2 page for your region and click Snapshots.
  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.

    The new volume can be the same size or larger than the original volume, but not smaller.

  4. From the drop-down list, choose the instance zone you recorded for the target instance.
  5. Click Yes, Create.
  6. Click Volumes.

    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 site

Use the Amazon Web Services Management Console to attach the new volume to your target site. Then, connect to the target site and bring the volume online.

Steps:
  1. In Amazon Web Services Management Console, 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.

    Remember, the device name must be unique on that instance.

  4. Click Yes, Attach.
  5. Bring the new volume online after you attach it.
  6. Make a remote desktop connection to the target instance and stop ArcGIS for Server.

    See Administering your Amazon Web Services instance with Windows Remote Desktop Connection for information on making a remote desktop connection to a Windows instance.

  7. Open the Microsoft Server Manager on the target instance.
  8. Expand the Storage node and click Disk Management.

    Notice that the new volume is offline.

  9. Right-click the disk volume in the Graphical View and click Online.

Replacing the volume on the target site

Remove the empty volume that came with the new ArcGIS Server on Amazon Web Services site, remap your newly attached volume to the D drive, and attach geodatabases (if needed).

CautionCaution:

Be sure to remove the empty volume, not the one that you just attached to the new site.

To remove the volume, you must detach geodatabases (if applicable) and stop the services that are pointing to the volume to be detached.

Steps:
  1. If you are using SQL Server Standard, start Management Studio, detach the geodatabases from the SQL Server instance, then stop the SQL Server instance.
  2. If you are using SQL Server Express, do the following to detach the geodatabases and stop the database server:
    1. Start ArcGIS for Desktop.
    2. Right-click each geodatabase on the database server, one at a time, and click Detach.
    3. Right-click the database server and click Disconnect .
    4. Right-click the database server and click Stop.
  3. Open the Services dialog box and stop the ArcGIS for Server service.
  4. Next, unmount the old volume.
  5. In Microsoft Server Manager on the target instance, expand the Storage node and click Disk Management.
  6. Right-click the volume that came with the new site and click Change Drive Letter and Paths.
  7. Choose the drive to unmount and click Remove.
  8. Click Yes when prompted to confirm that you want to remove the drive.
  9. ArcGIS Server relies on the data store files being on the D drive; therefore, you must remap the new volume to the D drive.
  10. Right-click the newly attached volume and click Change Drive Letter and Paths.
  11. Click Change.
  12. Choose D from the drop-down list and click OK.
  13. When prompted to confirm, click Yes.
  14. Close all applications and disconnect from the target instance.
  15. Stop your site and detach the old volume from the target instance.
  16. Stop your site using ArcGIS Server Cloud Builder on Amazon Web Services (not the Amazon Web Services Management Console).
  17. Log in to Amazon Web Services Management Console.
  18. Click Volumes.
  19. Take note of the volume ID of the volume you want to delete; you will need this information to identify the volume once it is detached.
  20. Right-click the empty volume and click Detach Volume.
  21. Click Yes, Detach to confirm.
  22. If you no longer need the detached volume, right-click it and click Delete Volume.
    CautionCaution:

    You cannot restore a volume once it is deleted; therefore, be sure you are deleting the correct volume.

  23. Click Yes, Delete to confirm.
  24. Start your site using ArcGIS Server Cloud Builder on Amazon Web Services (not the Amazon Web Services Management Console).

Attaching SQL Server databases

If you have geodatabases in SQL Server, you can attach them now that you have remapped the replacement drive.

Follow these steps if your instance is licensed with an ArcGIS for Server Enterprise license:

Steps:
  1. Log in to the target instance.
  2. Start SQL Server Management Studio.
  3. Attach your existing, populated geodatabases from their location on the newly attached volume.

    See the section "Attaching the database and transaction log files to the new instance" in Moving geodatabases in SQL Server to an ArcGIS Server for Amazon Web Services instance for instructions.

Follow these steps if your instance is licensed with an ArcGIS for Server Workgroup license:

Steps:
  1. Start ArcGIS for Desktop on the new instance.

    Remember to authorize ArcGIS for Desktop on the new instance. This is done from the ArcGIS Administrator.

  2. Connect to the database server on the new instance.
  3. Attach the geodatabases from the new volume to the database server.

    See the "Attaching a geodatabase to the new instance" section of Moving workgroup geodatabases between ArcGIS Server for Amazon Web Services instances for instructions on attaching a geodatabase to a database server.

Once all your data is accessible, you can restart or republish your services.

Restarting services

You can restart the services that got moved with your volume. For geodata services, though, you must first reset the replica properties to point to the geodata service on the new ArcGIS Server on Amazon Web Services site.

Use Replica Manager to reset the replica target.

Steps:
  1. Start ArcMap or ArcCatalog.
  2. Create a GIS Server connection to the new ArcGIS Server on Amazon Web Services site.
  3. Connect to your parent replica geodatabase.
  4. Right-click the geodatabase, point to Distributed Geodatabase, then click Manage Replicas.

    The Replica Properties dialog box opens.

  5. Right-click the replica in the list and click Properties.
  6. Click the Advanced tab.
  7. Set a new relative replica connection by browsing to your geodata service on the new ArcGIS Server on Amazon Web Services site.
  8. Click OK to close the Replica Properties dialog box.
  9. Close the Replica Manager.
  10. Restart your services from ArcGIS for Desktop or ArcGIS Server Manager.
12/29/2014