简体   繁体   English

从App Engine下载版本文件

[英]Download version files from app engine

There is any way to download a file from google managed VM docker? 有什么方法可以从Google管理的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 我们丢失了一个生产版本,我想将其下载到我的计算机上,但找不到应用程序路径

It should be possible. 应该有可能。

  • First, determine the GCE instance that runs your version. 首先,确定运行您的版本的GCE实例。 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. 在Cloud控制台中,您可以将其从“ Google托管”切换为自我托管。

  • Next, use gcloud compute ssh <instance name> to ssh to the instance. 接下来,使用gcloud compute ssh <instance name>将ssh gcloud compute ssh <instance name>到实例。

  • Next, run docker ps to find the container running your application code. 接下来,运行docker ps来找到运行您的应用程序代码的容器。 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. 您应该看到一些像nginx这样的副车容器,但是如果您仔细查看这些容器的名称,就会为您的应用程序看到一个。

  • Finally, you could docker exec -it <container id> -- bash to create a shell on the instance. 最后,您可以使用docker exec -it <container id> -- bash在实例上创建一个shell。 Or instead of bash, perhaps run a cat command or whatever else you need to do to recover your file. 或者代替bash,也许运行cat命令或执行恢复文件所需的任何其他操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM