I updated my Managed VM code and deployed it over the current deployment. I then deleted the old deployment.
There is a bug in my new deployment, but because I deleted the old deployment, I can't go back to the old version!
How can I get my old deployment back without redoing everything? I want to minimize downtime.
I would highly reccomend having at least one previous version running at all times, just so you can switch back instantly if there is a problem.
However, because the Container images are saved, you can roll back using this trick:
Let's say your first deployment is version 'v1' and your second is 'v2'
gcloud preview app deploy app.yaml --promote --version v1
gcloud preview app deploy app.yaml --promote --version v2
gcloud preview app deploy app.yaml --promote --version v1 --image-url appengine.gcr.io/vm-containers.<your-project-id>.appspot.com/<your-project-id>.default.v1