gcloud: how to download the app via cli

1 view
Skip to first unread message

Christian Haller via StackOverflow

unread,
Sep 9, 2015, 4:58:04 PM9/9/15
to google-appengin...@googlegroups.com

I depolyed an app with gcloud preview app deploy.

Is there a way to download it to an other local machine? How can I get the files? I tried it via ssh with no success (can't access the docker dir)

UPDATE: I found this:

gcloud preview app modules download default --version 1 --output-dir=my_dir

but it's not loading files

Log

Downloading module [default] to [my_dir/default]
Fetching file list from server...
|- Downloading [0] files...                                 -|


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/32487781/gcloud-how-to-download-the-app-via-cli

Zachary Newman via StackOverflow

unread,
Sep 9, 2015, 6:43:11 PM9/9/15
to google-appengin...@googlegroups.com

Currently, the best way to do this is to pull the files out of Docker.

Put instance into self-managed mode, so that you can ssh into it:

$ gcloud preview app modules set-managed-by default --version 1 --self

Find the name of the instance:

$ gcloud compute instances list | grep gae-default-1

Copy it out of the Docker container, change the permissions, and copy it back to your local machine:

$ gcloud compute ssh --zone=us-central1-f gae-default-1-1234 'sudo docker cp gaeapp:/app /tmp'
$ gcloud compute ssh --zone=us-central1-f gae-default-1-1234 "chown -R $USER /tmp/app"
$ gcloud compute copy-files --zone=us-central1-f gae-default-1-1234:/tmp/app /tmp/
$ ls /tmp/app
Dockerfile
[...]


Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/32487781/gcloud-how-to-download-the-app-via-cli/32490310#32490310
Reply all
Reply to author
Forward
0 new messages