Created
August 10, 2023 13:05
-
-
Save Thaina/8a17f29a13f4fef3b852de43abb67e7d to your computer and use it in GitHub Desktop.
gcloud backup all disk to images
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
for data in $(gcloud compute disks list --format="csv[no-heading](NAME,LOCATION)"); do $(gcloud compute images create ${data%%,*} --source-disk="${data%%,*}" --source-disk-zone="${data#*,}" --storage-location=asia-southeast1); done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment