i'm trying to move a few thousand files from a GCP bucket to an S3 bucket using the gcloud
cli - authentication works fine, as does moving the files themselves, however gcloud storage rsync
doesn't seem to maintain the Content-Type
of files when they're pushed in to S3.
i've checked the object metadata in GCP Cloud Storage, and it correctly displays image/png
as the content type - but after being moved to S3 the Content-Type
is the default application/octet-stream
in the object metadata.
i'm executing the transfer from my local macOS machine, but don't imagine it has issues recognizing mime types (correct me if i'm wrong!). not sure if it's something i'm missing (reviewed the gcloud storage rsync
flags and can't seem to find anything that works) or if there's a better tool for the job, but open to trying anything.
AWS_PROFILE=my-profile gcloud storage rsync \
gs://SOURCE_BUCKET \
s3://DEST_BUCKET/legacy \
--delete-unmatched-destination-objects \
--skip-if-dest-has-newer-mtime \
--recursive