Migrate an Existing Project from Red Cloud

Note

Red Cloud 2 is currently in beta testing and not available to all users. If you are not a Red Cloud 2 beta tester, use the production Red Cloud instead. This Red Cloud 2 documentation is still under development.

Beta testers: Report all problems to CAC Help. Please specify Red Cloud 2 when reporting problems. Thank you!

To migrate your Red Cloud project to Red Cloud 2, use the following procedures to migrate each instance and volume:

Migrate Volumes

To migrate a volume from Red Cloud to Red Cloud 2, use a Linux instance in each cloud to connect to the source or destination volume. Then use the dd command to copy the volume over an ssh connection.

In Red Cloud 2:

  1. Create a new volume matching the size of the source volume.

  2. Attach the new volume to a (destination) Linux instance.

  3. Log into the destination instance, note the device name of the new volume, e.g. /etc/sdb.

In Red Cloud:

  1. If the volume you want to migrate is not already attached, attach it to a (source) Linux instance.

  2. If the volume is attached to a (source) Linux instance, make sure all the file systems hosted on that volume are unmounted so cached data are flushed back to disk.

  3. From the source instance, note the device name of the volume to be migrated, e.g. /etc/vdb

  4. From the source instance, copy the source volume to the new volume attached to the destination instance in Red Cloud 2 like this:

sudo dd if=<source volume> bs=1M conv=fsync status=progress | gzip -c -9 | ssh <user>@<destination instance IP in Red Cloud 2> "gzip -d | sudo dd of=<destination volume> bs=1M"

Unless you have ssh key authentication configured between the source and destination instances, you will be prompted for password. Enter the password for the user on the destination instance when prompted.

When data transfer is completed,

  1. Detach the new volume from the destination instance in Red Cloud 2.

  2. Delete the destination instance if it's no longer needed.

After confirming the volume has been successfully migrated, clean up your Red Cloud project by deleting:

  1. the source instance, and
  2. the volume that was migrated to Red Cloud 2.

Migrate Instances

Migrate an instnace from Red Cloud to Red Cloud 2 by migrating its boot volume and recreate the instance in Red Cloud 2 using the migrated volume:

In Red Cloud,

  1. Shelve the instance to be migrated.

  2. Take a snapshot of the instance's boot volume.

  3. Make a copy of the boot volume by creating a new volume from the snapshot.

  4. Migrate this boot volume copy to Red Cloud 2 by following the instructions in the Migrate Volumes section.

After the boot volume has been migrated to Red Cloud 2, in Red Cloud 2,

  1. If needed, create a security group for the migrated instance.

  2. Skip this step if you plan to create your new instance in Red Cloud 2 on the public network. Otherwise, create a private network, router, and allocate a floating IP for the new instance.

  3. Launch a new instance using the volume migrated from Red Cloud by specifying the migrated volume under the Source tab.

  4. If the migrated instance is on a private network, associate the floating IP to the migrated instance.

After confirming the migrated instance is working correctly, clean up your project in Red Cloud by deleting:

  1. the shelved instance that was migrated,
  2. the copy of the boot volume,
  3. the snapshot of the boot volume, and
  4. the boot volume itself.

Need Help?

If you have questions or need assistance, go to CAC Help or email help@cac.cornell.edu.