gcloud storage rsync -r -d build/ gs://my-bucket/site/

Category: Google Cloud & Workspace

gcloud storage rsync -r -d build/ gs://my-bucket/site/

Sync a directory to a bucket with gcloud storage

Mirrors build/ into the site/ prefix of my-bucket, uploading changes and, with -d, deleting destination objects that are not in the source. Run with -n first to dry-run and review exactly what would change. It behaves like gsutil rsync but with faster parallel transfers.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.