關於網路那些事...

網路行銷,SEO,網路趨勢,教學文章,網頁設計,生活時事

How to download all files from Google Cloud Storage.

How to back up GCP Storage file and folder to local?

Here I'm using gsutil tool command line tool to download all file to local.

Install gsutil

First, you need install gsutil tool in your local environment.

curl https://sdk.cloud.google.com | bash

Restart your shell after installed.

exec -l $SHELL

Initialize gcloud environment:

gcloud init

Now, your can create a local folder for backup gcp storage file.

Download file

For example, download mypicture.png from bucket to local:

gsutil -m cp -R gs://BUCKETNAME/mypicture.png ~/my_local_folder/

Download folder

gsutil -m cp -R gs://BUCKETNAME ~/my_local_folder/

Reference
https://cloud.google.com/storage/docs/gsutil/commands/cp


如果這篇文章對你有幫助,請在這裡點個讚



最新文章推薦