I have a json file saved on my computer's desktop and would like to move it so it is saved in the desktop for Google Cloud Shell.
Any ideas on how you can do that?
I have a json file saved on my computer's desktop and would like to move it so it is saved in the desktop for Google Cloud Shell.
Any ideas on how you can do that?
There is a feature to download file to Cloud Shell as described here.
From the Cloud Shell web interface, you just need to click on the three-dot menu and click "Upload File":
If the file you want to upload is large, from a local install of the
gcloud
command, you can copy usingscp
by runningNote that you have to be properly authenticated with your account and project, which you can do by running
gcloud init
and following the steps.If the file you want to upload is huge, you can use GCS to store the file as an intermediate step (or as a final step if your file is too big for the Cloud Shell environment). You can upload the file through the web interface by going to a bucket and clicking the "upload files" button:
If your file is very huge (up to 5 TB), the best option is to upload to GCS using the CLI. After setting up the CLI with
gcloud init
, you can run this command to upload the file to GCS:You can then retrieve the data in your cloud shell environment using the command line tool, or by mounting the bucket as a volume using GCSFuse.
I suggest to take a look at the whole documentation, as the Cloud Shell is really powerful tool. For example, I especially like editor which is fully browser based IDE, so it does not need any additional software than browser.