Codementor Events

How to move a GCloud instance across two different Google projects ?

Published May 03, 2018
How to move a GCloud instance across two different Google projects ?

I got this problem from one of my mentees who wanted to move instances across projects — not just the image, but the disk and the data it has.

Before starting how to do this, let's get familiar with some of the jargons of Google Cloud.

Images
Snapshots
Disks

The process outline:
Before starting anything, make sure your instance serves no traffic or less traffic, which is negligible, and does not affect your business

  1. Create a snapshot of the disk used by the instance
  2. Create a disk out the snapshot
  3. Create an image out the disk
  4. Swith to the other project from terminal
  5. Create an instance out of the image created at step 3. The image will be available publicly and will be accessible via URL

Note: If there exists a persistent disk, make sure to clone and mount it inside the new instance. If that's not possible, SCP all of the files to another instance that has another persistent disk mounted in it.

Make sure you have write access to both of the projects. If you need more help in migrating projects, feel free to contact me!

Discover and read more posts from Dinesh
get started
post commentsBe the first to share your opinion
Show more replies