0

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

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
M Fuad
  • 73
  • 1
  • 1
  • 8
  • 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 Answers2

2

Found an answer. This guy already solve it. Many thanks on the comments :)

gcloud: how to download the app via cli

M Fuad
  • 73
  • 1
  • 1
  • 8
0

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.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245