Source Code download from GAE Flex

117 views
Skip to first unread message

Sai M

unread,
Aug 19, 2019, 6:26:58 PM8/19/19
to Google App Engine
Hello,

By accident i have lost the data on my personal laptop where i have kept the Source code of the project i have deployed on Google App Flex.  Unfortunately i don't have the backup as it happened by accident when i was trying to upgrade my OS.

The Project ID is..."smartcc".

Can you pls. help on instructions of how to down load the latest application source code deployed on Google App Flex env please.

Thanks a ton in advance.

Best Regards
Sai

Nicolas (Google Cloud Platform Support)

unread,
Aug 20, 2019, 1:16:43 PM8/20/19
to Google App Engine

Hi Sai,

It used to be possible to download your source code with the appcfg.py tools but unfortunately this tool is now deprecated and it’s replacement, the Cloud SDK  does not support this feature.

There is a feature request for this, and you can follow their progress here, although there is no ETA for when it will be implemented.

Joshua Smith

unread,
Aug 20, 2019, 1:24:58 PM8/20/19
to google-a...@googlegroups.com
The cloud SDK seems to do a compare of local files to those in cloud storage when you do a deploy. Would it be possible for Sai to access that bucket directly and download the objects back to his machine? The file names might be garbage, but it’d be relatively easy to fix that manually.

-Joshua

-- 
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/e52822af-78fd-45dc-97d1-4a72915fe6ef%40googlegroups.com.

Andrew Gorcester

unread,
Aug 20, 2019, 1:25:33 PM8/20/19
to google-a...@googlegroups.com
As a workaround, may I suggest enabling debug mode and SSHing into a running instance to inspect the filesystem directly? You might be able to exfiltrate the code manually. https://cloud.google.com/appengine/docs/flexible/python/debugging-an-instance

--

Mahesh Kumar

unread,
Aug 20, 2019, 2:36:34 PM8/20/19
to google-a...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.

Sai M

unread,
Aug 20, 2019, 4:11:36 PM8/20/19
to google-a...@googlegroups.com
HI Mahesh
i watched through your YOUTUBE video, but when i go into the DEBUG mode for my app i don't see any such source code visibility.
My App is NODEJS APP and deployed in GAE FLex.    

thx
sai

Sai M

unread,
Aug 22, 2019, 1:58:09 PM8/22/19
to google-a...@googlegroups.com
Yes Andrew , i think  your suggestion makes sense
I got similar instructions from Google Support team as follows...

1.- Enter to App Engine > Instances
2.-Click on ssh option of the instance you need to explore.
3.- In the popup window type the command "docker ps" to list the docker container.
4.- Write "docker exec -it CONTAINER_NAME bash" for access to the container (for example gaeapp).
5.- Do click on the cogwheel and choose the option "Download file", then write the full path of the file you need to download.

I have exactly followed the above instructions and i am able to see my source code in side the Container. But when i try to download , i always get the error "No Such File" .

For your reference, i have attached screenshots, 
ScreenShot-1 Shows the details .....pwd as (/app) and file name i am trying to down is (/package.json)
Screen Shot-2 shows the full path of the file i am trying to download..
Screenshot-3 shows the error of "No Such file" i am repeatedly getting even though i think i am entering the correct file path.
  
As far as i know, i think i am in correct directory of Container and using correct full path to download as you can see in the screenshots .  Pls. suggest where i am going wrong.. 

Screen-Shot-2.png
Screen-Shot-1.jpg
Screen-Shot-3.png

Diogo Almeida

unread,
Aug 22, 2019, 5:20:33 PM8/22/19
to Google App Engine
Have you tried to upload the files directly to a Cloud Storage bucket? Read here how to do it using gsutil.

On Thursday, August 22, 2019 at 1:58:09 PM UTC-4, Sai M wrote:
Yes Andrew , i think  your suggestion makes sense
I got similar instructions from Google Support team as follows...

1.- Enter to App Engine > Instances
2.-Click on ssh option of the instance you need to explore.
3.- In the popup window type the command "docker ps" to list the docker container.
4.- Write "docker exec -it CONTAINER_NAME bash" for access to the container (for example gaeapp).
5.- Do click on the cogwheel and choose the option "Download file", then write the full path of the file you need to download.

I have exactly followed the above instructions and i am able to see my source code in side the Container. But when i try to download , i always get the error "No Such File" .

For your reference, i have attached screenshots, 
ScreenShot-1 Shows the details .....pwd as (/app) and file name i am trying to down is (/package.json)
Screen Shot-2 shows the full path of the file i am trying to download..
Screenshot-3 shows the error of "No Such file" i am repeatedly getting even though i think i am entering the correct file path.
  
As far as i know, i think i am in correct directory of Container and using correct full path to download as you can see in the screenshots .  Pls. suggest where i am going wrong.. 

On Tue, 20 Aug 2019 at 18:25, 'Andrew Gorcester' via Google App Engine <google-appengine@googlegroups.com> wrote:
As a workaround, may I suggest enabling debug mode and SSHing into a running instance to inspect the filesystem directly? You might be able to exfiltrate the code manually. https://cloud.google.com/appengine/docs/flexible/python/debugging-an-instance

On Tue, Aug 20, 2019 at 10:16 AM 'Nicolas (Google Cloud Platform Support)' via Google App Engine <google-appengine@googlegroups.com> wrote:

Hi Sai,

It used to be possible to download your source code with the appcfg.py tools but unfortunately this tool is now deprecated and it’s replacement, the Cloud SDK  does not support this feature.

There is a feature request for this, and you can follow their progress here, although there is no ETA for when it will be implemented.


On Monday, August 19, 2019 at 6:26:58 PM UTC-4, Sai M wrote:
Hello,

By accident i have lost the data on my personal laptop where i have kept the Source code of the project i have deployed on Google App Flex.  Unfortunately i don't have the backup as it happened by accident when i was trying to upgrade my OS.

The Project ID is..."smartcc".

Can you pls. help on instructions of how to down load the latest application source code deployed on Google App Flex env please.

Thanks a ton in advance.

Best Regards
Sai

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscribe@googlegroups.com.

Sai M

unread,
Aug 23, 2019, 8:44:49 AM8/23/19
to google-a...@googlegroups.com
the question is about downloading the files from Docker Container where my App is running in GAE FLex Env.  
I went to the link you shared, it doesn't help as it is about uploading the files into cloud bucket which doesn't relate to my question.

I  have managed to download the source code by getting into Docker Container with the help of Google support team

On Thu, 22 Aug 2019 at 22:20, 'Diogo Almeida' via Google App Engine <google-a...@googlegroups.com> wrote:
Have you tried to upload the files directly to a Cloud Storage bucket? Read here how to do it using gsutil.

On Thursday, August 22, 2019 at 1:58:09 PM UTC-4, Sai M wrote:
Yes Andrew , i think  your suggestion makes sense
I got similar instructions from Google Support team as follows...

1.- Enter to App Engine > Instances
2.-Click on ssh option of the instance you need to explore.
3.- In the popup window type the command "docker ps" to list the docker container.
4.- Write "docker exec -it CONTAINER_NAME bash" for access to the container (for example gaeapp).
5.- Do click on the cogwheel and choose the option "Download file", then write the full path of the file you need to download.

I have exactly followed the above instructions and i am able to see my source code in side the Container. But when i try to download , i always get the error "No Such File" .

For your reference, i have attached screenshots, 
ScreenShot-1 Shows the details .....pwd as (/app) and file name i am trying to down is (/package.json)
Screen Shot-2 shows the full path of the file i am trying to download..
Screenshot-3 shows the error of "No Such file" i am repeatedly getting even though i think i am entering the correct file path.
  
As far as i know, i think i am in correct directory of Container and using correct full path to download as you can see in the screenshots .  Pls. suggest where i am going wrong.. 

On Tue, 20 Aug 2019 at 18:25, 'Andrew Gorcester' via Google App Engine <google-a...@googlegroups.com> wrote:
As a workaround, may I suggest enabling debug mode and SSHing into a running instance to inspect the filesystem directly? You might be able to exfiltrate the code manually. https://cloud.google.com/appengine/docs/flexible/python/debugging-an-instance

On Tue, Aug 20, 2019 at 10:16 AM 'Nicolas (Google Cloud Platform Support)' via Google App Engine <google-a...@googlegroups.com> wrote:

Hi Sai,

It used to be possible to download your source code with the appcfg.py tools but unfortunately this tool is now deprecated and it’s replacement, the Cloud SDK  does not support this feature.

There is a feature request for this, and you can follow their progress here, although there is no ETA for when it will be implemented.


On Monday, August 19, 2019 at 6:26:58 PM UTC-4, Sai M wrote:
Hello,

By accident i have lost the data on my personal laptop where i have kept the Source code of the project i have deployed on Google App Flex.  Unfortunately i don't have the backup as it happened by accident when i was trying to upgrade my OS.

The Project ID is..."smartcc".

Can you pls. help on instructions of how to down load the latest application source code deployed on Google App Flex env please.

Thanks a ton in advance.

Best Regards
Sai

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/0b125507-de7c-4ac3-bb9b-3a38d513a359%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages