Cloud Shell上でのオペレーション
### Storageの操作
### GCE関連、Snapshotの作成
### Storageの操作
### GCE関連、Snapshotの作成
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Storageの操作 | |
# Google Storageのバケットを作成する | |
# gsutil mb gs://<bucket name> | |
$ gsutil mb gs://test-toshi | |
Creating gs://test-toshi/... | |
# Cloud shell から storage に コピーする | |
$ gsutil cp test.data gs://test-toshi | |
Copying file://test.data [Content-Type=application/octet-stream]... | |
- [1 files][ 19.0 B/ 19.0 B] | |
Operation completed over 1 objects/19.0 B. | |
### GCE 関連の操作 | |
# GCEのリストを表示する | |
$ gcloud compute disks list | |
NAME ZONE SIZE_GB TYPE STATUS | |
toshi-vm us-central1-f 10 pd-ssd READY | |
# Snapshotを作成する | |
# gcloud compute disks snapshot <GCE name> --zone=<ZONE name> --snapshot-names=<snapshot name> | |
$ gcloud compute disks snapshot toshi-vm --zone=us-central1-f --snapshot-names=test | |
Creating snapshot(s) test...done. | |