Alchitry
Alchitry

Reputation: 1549

Restore deleted instance from persistent disk

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?

Upvotes: 3

Views: 2824

Answers (3)

Fredrik Svensson
Fredrik Svensson

Reputation: 127

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

Upvotes: 0

Alchitry
Alchitry

Reputation: 1549

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

Upvotes: 1

Yuri Ginsburg
Yuri Ginsburg

Reputation: 2611

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.

Upvotes: 0

Related Questions