gsutil
從storage下載檔案
sudo gsutil -m cp gs://[storage路徑] [下載存放位置]上傳檔案至storage
sudo gsutil cp [file] gs://[storage路徑]
# 如果要上傳資料夾,請加上 -r 參數參考連結: https://coder.tw/?p=6981
403 insufficient permission
表示執行命令的VM可能沒有讀寫storage的權限
先關閉VM並開啟編輯,直接將Cloud API 存取權範圍設定為允許所有 Cloud API 的完整存取權;或者只更改storage的權限設定
打開防火牆
參考連結: http://ps.hsuweni.idv.tw/?p=4751
vm與storage之間的資料夾傳輸
下列指令會將資料從 data 值區與所有子目錄複製到 /mnt/filer 目錄。
gsutil rsync -r gs://data /mnt/filer
下列指令會將資料從 /mnt/filer 目錄與所有子目錄複製到 archive 值區。
gsutil rsync -r /mnt/filer gs://archivehttps://cloud.google.com/filestore/docs/copying-data?hl=zh-tw
指用指令操作vm
https://cloud.google.com/sdk/gcloud/reference/compute/instances/create#--accelerator
Last updated
Was this helpful?