Reputation: 7730
Since it takes time to create snapshot of google compute engine instance, I wonder it is possible to issues gcloud compute disks snapshot
command on my local machine and close terminal on local machine without interrupting shapshot creation process?
Upvotes: 0
Views: 90
Reputation: 21374
From the documentation for gcloud compute disks snapshot
:
FLAGS
--async
Display information about the operation in progress, without waiting for the operation to complete.
You can run gcloud compute disks snapshot --async
and note the operation ID, then run gcloud compute operations describe <OPERATION ID>
to check on the operation (you may also have to provide the zone of the operation, which should be the same as the zone of the disk).
Even if you don't use the --async
flag, the operation is running asynchronously in the background (gcloud is just staying open until it finishes). If you close the terminal, the snapshot will finish. You'd just need to do some digging to find the operation ID if you're interested in following up on its status.
Upvotes: 2