Download files from GCP storage bucket
Happy Learning!!!
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
#Google Cloud Shell | |
#Step 1 | |
mkdir Data | |
#Step 2 Command | |
gsutil -m cp -R gs://BUCKET_NAME/FOLDER_OR_FILE_PATH ./Data | |
#Step 3 | |
zip -r Data.zip Data | |
#Step 4 Download | |
dl Data.zip | |
#Push to bucket and download | |
gsutil mv Data.zip gs://my_bucket/* | |
#Step 5 - Cleanup | |
rm -r Data.zip | |
rm -r Data | |
#Ref -https://stackoverflow.com/questions/11640637/download-files-and-folders-from-google-storage-bucket-to-a-local-folder | |
#Limit is 5GB | |
Happy Learning!!!
No comments:
Post a Comment