3
votes

I want to slowly migrate my site to GCE so I don't want to pay for server time when I'm not working on the site as no one will be using it.

I tried just deleting the instance I was using and creating a new one with the same configuration, static IP, and using the same persistent disk. When it booted all the files seemed to be there, but the website I setup didn't work anymore. I just got the default Apache page.

How can I stop an instance when I'm not using it and restore it to exactly how it was?

3
As long as you're talking about a root persistent disk that you're booting from, all of the files should be exactly as they were when the instance was deleted. Perhaps some process needs to be manually started? - Brian Dorsey

3 Answers

1
votes

I found if I first shut down the machine before deleting it, it restores correctly and everything works.

0
votes

Try the following: Make a snapshot of root persistent disk before deleting the instance. To restart the the instance use "new persistent disk from snapshot" as "Boot source" in the console.

0
votes

It's now possible to shutdown/start a machine, without altering configuration or data.