skip to Main Content

We have a google cloud AppEngine service that was written and deployed by a developer who is no longer with our company (we do still have his login credentials, however). The version is on a custom runtime and a flexible environment, and it was last deployed on April 16, 2018.
Our problem is that this service is intermittently throwing 502/nginx errors and we cannot seem to locate the source code for it. When we go to the debug tab on that version, we see the attached screen. Attempting to redeploy following the instructions in the screenshot errors because there are no source files in our local directory.

Does anyone know if it is possible to find out where this code was deployed from? We have of course scoured our GitLab and cannot find the project there.

enter image description here

3

Answers


  1. I found that the code of the App engine services is uploaded to folder in Google Cloud storage

    1. Open storage browser
    2. go to the folder staging.[yourproject].appspot.com
    3. check the folder us.gcr.io this may vary depending on the region of appengine
    4. open the folder appengine
    5. The files within this folder are TAR files with the source code of your app engine services.

    If this folder was deleted, the code cannot be recovered.

    Login or Signup to reply.
  2. You can try going to App Engine > Instances in your GCP console (https://console.cloud.google.com/appengine/instances). Select the correct service from the dropdown and then choose "SSH" on the instance itself.

    enter image description here

    A Cloud Shell will open. Do sudo docker exec -t -i gaeapp /bin/bash to open the app container (Access app files in ssh session into google app engine flexible?)

    Now if you do ls you should see the files. However, at this point I don’t know how to easily download all of them.

    @Jans answer would be far more straight forward to access the files, but staging.[yourproject].appspot.com by default will delete files that are older than 14 days

    Login or Signup to reply.
  3. Adding another option here, a while ago I was working on several ways of doing so and gathered them in a GitHub repo. So I’ll leave it here in case if it works for you, hope so!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search