0

There is any way to download a file from google managed VM docker? we lost one that is in production version and I want to download it to my computer but I cant find the app path

Dor Shay
  • 189
  • 11

1 Answers1

0

It should be possible.

  • First, determine the GCE instance that runs your version. The name of the version should be part of the instance name. If your version has multiple instances, you may have to try all of them (or if your file was part of the application, any of them may work).

  • From the Cloud console, you can switch it from "Google managed" to self-managed.

  • Next, use gcloud compute ssh <instance name> to ssh to the instance.

  • Next, run docker ps to find the container running your application code. You should see a few side-car containers like nginx, but if you look through the names of the containers you should see one for your application.

  • Finally, you could docker exec -it <container id> -- bash to create a shell on the instance. Or instead of bash, perhaps run a cat command or whatever else you need to do to recover your file.

Bill Prin
  • 2,498
  • 1
  • 20
  • 27