I have recently lost access to my hard drive ( it died) and the only source code of my application ( Node JS) is at the Google Cloud Platform. Is there a way that i can download my node js project from the GCP? i google it up, and notice the download function only available at Python
-
I assume you aren't using Cloud Source Repos or any other Git-like option? In the future, use version-control. Or at least Dropbox/Drive syncing – OneCricketeer Jan 23 '20 at 08:29
-
In any case, it is not clear where your project is deployed to... I believe there is a way to download AppEngine applications. You could SCP to an GCE node (unless you lost the SSH key as well) – OneCricketeer Jan 23 '20 at 08:31
-
@cricket_007 yes.. does it mean theres's no way on getting it back?.. my project deployed to the app engine. as per the guide here https://cloud.google.com/appengine/docs/standard/nodejs/runtime – M Fuad Jan 23 '20 at 08:36
-
you can find my article here, use winscp to download files from google cloud: https://medium.com/google-cloud/set-up-anaconda-under-google-cloud-vm-on-windows-f71fc1064bd7 – Ray Jan 23 '20 at 08:37
-
2@Raymond but im using the App engine. that article refer to the Compute Engine – M Fuad Jan 23 '20 at 08:39
2 Answers
Found an answer. This guy already solve it. Many thanks on the comments :)

- 73
- 1
- 1
- 8
-
-
After half way through the post, i still failed to download the code. So its not a good answer :( – M Fuad Jan 24 '20 at 16:05
So, hard lesson learned - Use Cloud Source Repos, and hook up functions such that a commit there will (re)deploy your AppEngine service(s). Basically, preventing you from needing to download any dpeloyment tools locally, and removing the possibility of losing code (unless GCP is unavailable).
I think I've done it in the past with Python apps, but at the moment, I found this if you have a Flexible instance of AppEngine
gcloud app instances scp
lets you remotely copy files to or from an App Engine Flexible instance`
https://cloud.google.com/sdk/gcloud/reference/app/instances/scp
Basically, I don't think the UI will let you get your code, but gcloud app
probably has more functionality.
And I am also not seeing anything specific for Node, but the best workaround I can think of would be to try to SSH to the machine, if you can, then SCP should work as well to pull files off it.

- 179,855
- 19
- 132
- 245
-
im having issue on the mentioning the destination, is this correct? gcloud app instances scp --services=default --version=v5 --C:\Users\Me – M Fuad Jan 23 '20 at 08:52
-
That is the start of the command. I don't know the instances running in your project to give you more than that – OneCricketeer Jan 23 '20 at 08:52
-
In any case, this command will not work in the Standard AppEngine instance (which is offered as part of a Node project) – OneCricketeer Jan 23 '20 at 08:53
-
Realistically, you could contact GCP support, and they could probably email you your code, or put it in a GCS location for you – OneCricketeer Jan 23 '20 at 08:54
-
-
oh i browsed the contact support, and they bring me here.. to the community support :( – M Fuad Jan 23 '20 at 08:57
-
They also link here https://groups.google.com/forum/#!forum/google-appengine – OneCricketeer Jan 23 '20 at 09:00