Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save joaquinalvarezdev/79eed77d59da68e0b6cd890aee3dee6a to your computer and use it in GitHub Desktop.
Save joaquinalvarezdev/79eed77d59da68e0b6cd890aee3dee6a to your computer and use it in GitHub Desktop.
Example synchronization of files from a local folder to a google cloud bucket using gcloud sdk
#cd to dir of sdk in case you dont have it in var
cd C:\GoogleCloud\google-cloud-sdk-280.0.0-windows-x86-bundled-python\google-cloud-sdk\bin
gcloud auth activate-service-account storage-api@yourproject.iam.gserviceaccount.com --key-file=path-to-your-key/key.json --project project-name && gsutil -m rsync -r "C:\LocalDirectory" gs://bucket-link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment