This document provides a detailed mapping of gsutil commands and flags to their gcloud storage equivalents, including caveats and key differences. This guide is intended to supplement the main Transitioning from gsutil to gcloud storage document.
You can also reference to the complete gcloud storage documents here.
The gsutil ls command lists buckets, objects, and prefixes. The equivalent command is gcloud storage ls.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -l | -l, --long | Long listing format. |
| -L | -L, --full | Full listing format. |
| -a | -a, --all-versions | Includes non-current object versions. |
| -b | -b, --buckets | Lists only buckets. |
| -r, -R | -r, --recursive | Recursive listing. |
| -e | -e, --etag | Includes ETag in long listing (-l) output |
| -h | --readable-sizes | Displays object sizes in human-readable format. Renamed from -h to avoid conflict with global --help. |
| -d | Not supported | Option to list only directories has no direct translation and does not work as documented in gsutil. |
- Bucket Listing with Wildcards: When using a wildcard for buckets,
gcloud storage lsgroups results by bucket name;gsutilprovides a flat list of objects. - -L (Full Listing) Output:
gcloud storageuses title case for keys and omits fields with "None" values.gsutilsimply capitalizes the first word (depending on the term). - Order of objects: The order of objects returned may differ between tools.
- Time Format:
gcloud storagealways converts timestamps to UTC.gsutilmay not be strict about the timezone. - Error Messages:
gcloud storagedisplays error messages at the end of the output.
Outputs the contents of objects to stdout. Equivalent to gcloud storage cat.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -h | -d, --display-url | Prints a short header for each object. |
| -r | --range | Specifies a byte range to retrieve. |
Displays space in bytes used by objects. Equivalent to gcloud storage du.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -0 | --zero-terminator, -0 | Ends each output line with a 0 byte. |
| -a | --all-versions, -a | Includes live and noncurrent object versions. |
| -c | --total, -c | Includes a total size at the end. |
| -e | --exclude-name-pattern, -e | Excludes a pattern. Can be specified multiple times. |
| -h | --readable-sizes, -r | Prints sizes in human-readable format (e.g., 1 KiB, 234 MiB). |
| -s | --summarize, -s | Displays only the total size for each URL argument. |
| -X | --exclude-name-pattern-file, -X | Excludes patterns from a file. |
Replaced by gcloud storage {buckets|objects} describe and gcloud storage {buckets|objects} update.
gsutil acl get -> gcloud storage <RESOURCE> describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="multi(acl:format=json)" | Specify buckets or objects. |
gsutil acl set -> gcloud storage <RESOURCE> update
| gsutil Flag | gcloud storage Flag | Applies To | Notes |
|---|---|---|---|
<file-path> |
--acl-file=<ACL_FILE_PATH> | Buckets/Objects | Specifies a file containing ACL data. |
<predefined> |
--predefined-acl=<PREDEFINED_ACL> | Buckets/Objects | Specifies a predefined (canned) ACL. |
| -a | --all-versions, -a | Objects Only | Apply to all object versions. |
| -r, -R | --recursive, -r | Objects Only | Recursively apply. |
| -f | --continue-on-error | Buckets/Objects | Continue on error. |
gsutil acl ch -> gcloud storage <RESOURCE> update
| gsutil Flag | gcloud storage Flag | Applies To | Notes |
|---|---|---|---|
| -u | --add-acl-grant=GRANT | Buckets/Objects | Adds grant for a user. Format: ENTITY:ROLE |
| -g | --add-acl-grant=GRANT | Buckets/Objects | Adds grant for a group. Format: ENTITY:ROLE |
| -p | --add-acl-grant=GRANT | Buckets/Objects | Adds grant for a project role. Format: ENTITY:ROLE |
| -d | --remove-acl-grant= | Buckets/Objects | Removes all roles for the entity. |
| -a | --all-versions, -a | Objects Only | Apply to all object versions. |
| -r, -R | --recursive, -r | Objects Only | Recursively apply. |
| -f | --continue-on-error | Buckets/Objects | Continue on error. |
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil defacl get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="default(defaultObjectAcl)" | Displays the default object ACL. |
gsutil defacl set -> gcloud storage buckets update
| gsutil Argument | gcloud storage Flag | Notes |
|---|---|---|
<file-path> |
--default-object-acl-file=<ACL_FILE> | Specifies a file with the default object ACL. |
<predefined-acl> |
--predefined-default-object-acl= | Specifies a predefined default object ACL. |
gsutil defacl ch -> gcloud storage buckets update
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -u | --add-default-object-acl-grant=GRANT | Adds grant for a user. Format: ENTITY:ROLE. |
| -g | --add-default-object-acl-grant=GRANT | Adds grant for a group. Format: ENTITY:ROLE. |
| -p | --add-default-object-acl-grant=GRANT | Adds grant for a project role. |
| -d | --remove-default-object-acl-grant= | Removes all grants for the entity. |
| -f | --continue-on-error | Continues on error. |
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil autoclass get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="default(autoclass)" | Displays Autoclass config. |
gsutil autoclass set -> gcloud storage buckets update
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| set on | --enable-autoclass | Enables Autoclass. |
| set off | --no-enable-autoclass | Disables Autoclass. |
gcloud storage buckets updateonly accepts one bucket URL at a time.
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil defstorageclass get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="value(storageClass)" | Displays the default storage class. |
gsutil defstorageclass set -> gcloud storage buckets update
| gsutil Command | gcloud storage Flag | Notes |
|---|---|---|
| set | --default-storage-class=<STORAGE_CLASS> | Sets the default storage class. |
- Storage Class Abbreviations:
gsutilallows abbreviations (e.g.,NforNEARLINE).gcloud storagerequires full names.
Equivalent to gcloud storage objects compose.
- Preconditions: In
gcloud storage, preconditions are set using specific flags like--if-generation-match.
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil cors get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="default(cors)" | Displays CORS config in YAML. |
gsutil cors set -> gcloud storage buckets update
| gsutil Command | gcloud storage Flag | Notes |
|---|---|---|
| set | --cors-file=<CORS_FILE> | Specifies a local JSON or YAML file for CORS config. Accepts one bucket URL. |
| set [] | --clear-cors | Clears CORS settings. |
Equivalent to gcloud storage hash. gcloud command uses additive flags instead of subtractive flags in gsutil.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -c | --skip-md5 | gsutil: "calculate CRC32c". gcloud: "skip MD5". |
| -m | --skip-crc32c | gsutil: "calculate MD5". gcloud: "skip CRC32c". |
| -h | --hex | Outputs hashes in hex. Default is base64. |
| Default | Default | Calculates both CRC32c and MD5. |
- Hash Selection:
gsutiluses additive flags (-c, -m).gcloud storageuses subtractive flags (--skip-md5, --skip-crc32c).
Mirrored in gcloud storage hmac.
gsutil hmac create -> gcloud storage hmac create
gsutil hmac delete -> gcloud storage hmac delete
gsutil hmac get -> gcloud storage hmac describe
gsutil hmac list -> gcloud storage hmac list
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -a | --all, -a | Show all keys, including recently deleted. |
| -l | --long, -l | Long listing format. |
| -u | --service-account, -u | Filter by service account. |
| -p | --project | Project ID or number. |
gsutil hmac update -> gcloud storage hmac update
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -s ACTIVE | --activate | Sets key state to ACTIVE. |
| -s INACTIVE | --deactivate | Sets key state to INACTIVE. |
| -e | --etag | Conditional update based on ETag. |
| -p | --project | Project ID or number. |
For buckets, functionality is in gcloud storage buckets get-iam-policy, set-iam-policy, add-iam-policy-binding, and remove-iam-policy-binding. Object-level IAM is generally discouraged in favor of bucket-level policies with conditions.
gsutil iam get -> gcloud storage buckets get-iam-policy
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | get-iam-policy --format=json | Matches gsutil JSON output. |
gsutil iam set -> gcloud storage buckets set-iam-policy
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -e | --etag=, -e | Conditional set. |
| -f | --continue-on-error, -c | Continue on error. |
| file | POLICY_FILE | Policy file positional argument. Order is reversed: URL first, then file in gcloud. |
gsutil iam ch -> gcloud storage buckets add-iam-policy-binding / remove-iam-policy-binding
| gsutil Flag | gcloud storage Equivalent | Notes |
|---|---|---|
| binding | --member= --role= on add-iam-policy-binding | Grants role to member. Binding format needs parsing. |
| -d binding | --member= --role= on remove-iam-policy-binding | Removes role from member. |
| -d entity | --member= on remove-iam-policy-binding | Removes all roles for the member. |
iam chComplexity: Migratinggsutil iam chscripts requires replacing with potentially multiplegcloud storage buckets add/remove-iam-policy-bindingcalls or replicating the read-modify-write loop in your script.- Conditions:
gsutil iam chdoes not support IAM policies with conditions;gcloud storagedoes.
Split between gcloud storage service-agent and gcloud storage buckets update / describe.
gsutil kms authorize -> gcloud storage service-agent
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -p | --project | Project ID. |
| -k | --authorize-cmek=<KMS_KEY> | KMS key to authorize. |
gsutil kms encryption -> gcloud storage buckets describe / update
- Get:
describe --format="value(encryption.defaultKmsKeyName)" - Set:
update --default-encryption-key=<KMS_KEY> - Clear:
update --clear-default-encryption-key
gsutil kms serviceaccount -> gcloud storage service-agent
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -p | --project | Project ID. |
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil label get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="gsutiljson(labels)" | Displays labels. |
gsutil label set -> gcloud storage buckets update
| gsutil Argument | gcloud storage Flag | Notes |
|---|---|---|
<label-json-file> |
--labels-file=<LABEL_FILE_PATH> | Specifies a JSON file with labels. |
gsutil label ch -> gcloud storage buckets update
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -l | --update-labels=KEY=VALUE,... | Adds or updates labels. |
| -d | --remove-labels=KEY,... | Removes labels by key. |
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil lifecycle get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="gsutiljson(lifecycle)" | Displays lifecycle config. |
gsutil lifecycle set -> gcloud storage buckets update
| gsutil Argument | gcloud storage Flag | Notes |
|---|---|---|
<config-json-file> |
--lifecycle-file=<LIFECYCLE_FILE> | Specifies a local JSON file with lifecycle config. |
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil logging get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="default(logging)" | Displays logging config. |
gsutil logging set on -> gcloud storage buckets update
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -b | --log-bucket | Specifies the log bucket. |
| -o | --log-object-prefix | Specifies the log object prefix. |
gsutil logging set off -> gcloud storage buckets update
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| set off | --clear-log-bucket and --clear-log-object-prefix | Clears logging config. |
Equivalent to gcloud storage buckets create. Aliases like makebucket, createbucket, md, mkdir are not supported in gcloud storage.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -p | --project | Project ID. |
| -c, -s | --default-storage-class, -c, -s | Default storage class. |
| -l | --location, -l | Bucket location. |
| -b on | --uniform-bucket-level-access, -b | Enable UBLA. |
| --autoclass | --enable-autoclass | Enable Autoclass. |
| --retention | --retention-period | Retention period. |
| --pap enforced | --public-access-prevention | Enforce public access prevention. |
| -k | --default-encryption-key, -k | Default KMS key. |
| --placement | --placement | Regions for custom dual-region. |
| --rpo | --recovery-point-objective, --rpo | Replication setting for dual/multi-region. |
Equivalent to gcloud storage cp. Alias copy is not supported.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -a | --predefined-acl=<PREDEFINED_ACL>, -a | Predefined ACL for uploaded objects. |
| -A | --all-versions, -A | Copies all source versions. Disables parallelism in gcloud. |
| -c | --continue-on-error, -c | Continue on error. |
| -D | --daisy-chain, -D | Copy between buckets via local machine. |
| -e | --ignore-symlinks | Excludes symbolic links. |
| -I | --read-paths-from-stdin, -I | Read paths from stdin. |
| -j <ext,...> | --gzip-in-flight="<ext,...>", -j | Gzip transport encoding for matching extensions. |
| -J | --gzip-in-flight-all, -J | Gzip transport encoding for all uploads. |
| -L | --manifest-path=, -L | Output manifest log file. |
| -n | --no-clobber, -n | Don't replace existing files. |
| -p | --preserve-acl, -p | Preserve ACLs when copying in the cloud. |
| -P | --preserve-posix, -P | Preserve POSIX attributes. |
| -r, -R | --recursive, -r, -R | Recursive copy. |
| -s | --storage-class=, -s | Storage class of destination. |
| -U | --skip-unsupported, -U | Skip unsupported types (e.g., S3 Glacier). |
| -v | --print-created-message, -v | Print version-specific URL for uploads. |
| -z <ext,...> | --gzip-local="<ext,...>", -z | Compress local files with matching extensions before upload. |
| -Z | --gzip-local-all, -Z | Compress all local files before upload. |
| --stet | (Not supported) | Split-trust encryption tool flag. |
- Parallelism:
gcloud storage cpis parallel by default.gsutilrequires top-level-mflag. - Empty Directories:
gcloud storage cpcopies 0-byte placeholder objects created by Cloud Console,gsutil cpskips them. - Error Handling:
gcloud storage cpattempts to copy all valid sources even if some are invalid.gsutil cpmay halt on the first invalid source. - Local Directory Creation:
gcloud storage cpcreates missing local directories in the destination path during downloads.gsutil cpfails if the directory doesn't exist. - Support for Local Copy: Gcloud Storage is meant as a tool to work with GCS (cloud). So it does not support local copying (where both source and destination are local files/folders). Trying to use the tool this way will cause an error.
Equivalent to gcloud storage mv. Aliases move, ren, rename are not supported. Most gsutil cp flags are available, except not applicable ones like -r.
- Non-Atomic: Like
gsutil mv,gcloud storage mvis a copy followed by a delete.
Pub/Sub notifications are managed via gcloud storage buckets notifications. Legacy Object Change Notifications (watchbucket, stopchannel) are not supported in gcloud storage.
gsutil notification create -> gcloud storage buckets notifications create
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -f | --payload-format=<PAYLOAD_FORMAT>, -f | Payload format (json or none). |
| -p | --object-prefix=<OBJECT_PREFIX>, -p | Filter by object prefix. |
| -t | --topic=, -t | Cloud Pub/Sub topic. |
| -m | --custom-attributes=KEY=VALUE,..., -m | Custom key:value attributes. |
| -e | --event-types=<EVENT_TYPE>,..., -e | Filter by event type (e.g., OBJECT_FINALIZE). |
| -s | --skip-topic-setup, -s | Skip topic creation/permission setup. |
gsutil notification list -> gcloud storage buckets notifications list
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -o | (Not supported) | Listing legacy Object Change Notification channels not supported. |
gsutil notification delete -> gcloud storage buckets notifications delete
Deletes a specific notification by name or all notifications on a bucket.
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil pap get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="default(iamConfiguration.publicAccessPrevention)" | Displays PAP config. |
gsutil pap set -> gcloud storage buckets update
| gsutil Argument | gcloud storage Flag | Notes |
|---|---|---|
| enforced | --public-access-prevention | Enforces PAP. |
| inherited | --no-public-access-prevention | Sets PAP to inherited. |
Equivalent to gcloud storage buckets delete. Aliases deletebucket, removebucket, etc., are not supported.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -f | --continue-on-error | Continues despite errors. |
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil requesterpays set -> gcloud storage buckets update
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| on | --requester-pays | Enables Requester Pays. |
| off | --no-requester-pays | Disables Requester Pays. |
gsutil requesterpays get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="default(requesterPays)" | Displays Requester Pays config. |
Split across gcloud storage buckets and gcloud storage objects commands.
- Set/Clear/Get Bucket Retention Policy:
gcloud storage buckets update --retention-period,gcloud storage buckets update --clear-retention-period,gcloud storage buckets describe --format="default(retentionPolicy)" - Lock Bucket Retention Policy:
gcloud storage buckets update --lock-retention-period - Default Event-Based Hold:
gcloud storage buckets update --default-event-based-hold / --no-default-event-based-hold - Object Event-Based Hold:
gcloud storage objects update --event-based-hold / --no-event-based-hold - Object Temporary Hold:
gcloud storage objects update --temporary-hold / --no-temporary-hold
Equivalent to gcloud storage objects update.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -k | --encryption-key=KEY, --clear-encryption-key | Complex behavior, see Caveats. |
| -s | --storage-class=, -s | Rewrite to specified storage class. |
| -r, -R | --recursive, -r | Recursive rewrite. |
| -f | --continue-on-error | Continue on error. |
| -I | --read-paths-from-stdin, -I | Read paths from stdin. |
| -O | --no-preserve-acl | Use bucket's default object ACL. |
- Encryption Handling:
gsutil rewrite -kbehavior depends onbotoconfig. Ifencryption_keyis set in boto, that key is applied. If not set, it's equivalent togcloud storage objects update --clear-encryption-key, potentially removing CSEK/CMEK. - Redundancy Checks:
gsutil rewriteskips no-op transformations.gcloud storage objects updatemight not, potentially causing unnecessary operations.
Equivalent to gcloud storage rm. Aliases del, delete, remove are not supported.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -f | --continue-on-error | Continue on error. |
| -I | --read-paths-from-stdin, -I | Read paths from stdin. |
| -R, -r | --recursive, -r | Recursive delete. |
| -a | --all-versions, -a | Delete all versions. |
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil rpo get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="default(rpo)" | Displays RPO setting. |
gsutil rpo set -> gcloud storage buckets update
| gsutil Argument | gcloud storage Flag | Notes |
|---|---|---|
| ASYNC_TURBO or DEFAULT | --recovery-point-objective=RPO, --rpo=RPO | Sets replication setting. |
Equivalent to gcloud storage rsync.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -a | --predefined-acl=<PREDEFINED_ACL> | Sets predefined ACL on uploads. |
| -c | --checksums-only | Compare checksums only. |
| -C | --continue-on-error | Continue on error. |
| -d | --delete-unmatched-destination-objects | Delete destination files not in source. |
| -e | --ignore-symlinks | Exclude symlinks. |
| -i | --no-clobber | Skip existing destination files. |
| -j <ext,...> | --gzip-in-flight="<ext,...>" | Gzip transport encoding. |
| -J | --gzip-in-flight-all | Gzip all uploads. |
| -n | --dry-run | Dry run. |
| -p | --preserve-acl | Preserve ACLs. |
| -P | --preserve-posix | Preserve POSIX attributes. |
| -r, -R | --recursive, -r, -R | Recursive sync. |
| -u | --skip-if-dest-has-newer-mtime | Skip if destination is newer. |
| -U | --skip-unsupported | Skip unsupported storage classes. |
| -x | --exclude= | Exclude files matching pattern. |
- Change Detection:
gsutil rsyncdefaults to size and mtime.gcloud storage rsyncalso uses size and mtime, but falls back to checksums if sizes match but mtimes differ or are missing. - Parallelism:
gcloud storage rsyncis parallel by default.gsutil rsyncrequires top-level-m. - Symlink Handling:
gsutil rsyncfollows symlinks by default.gcloud storage rsyncignores them by default (use--no-ignore-symlinks).
Equivalent to gcloud storage objects update, but with different flag structure.
| Action | gsutil setmeta Example | gcloud storage objects update Equivalent |
|---|---|---|
| Set Metadata | -h "Content-Type:text/html" | --content-type="text/html" |
| -h "Cache-Control:no-cache" | --cache-control="no-cache" | |
| -h "Content-Language:en" | --content-language="en" | |
| -h "x-goog-meta-foo:bar" | --update-custom-metadata=foo=bar | |
| Remove Metadata | -h "Content-Type" | --clear-content-type |
| -h "Cache-Control" | --clear-cache-control | |
| -h "x-goog-meta-foo" | --remove-custom-metadata=foo |
Equivalent to gcloud storage sign-url.
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
<private-key-file> |
--private-key-file=<PRIVATE_KEY_FILE> | Path to private key file. Positional in gsutil. |
| -u, --use-service-account | (No flag needed) | Default behavior in gcloud if --private-key-file not used. |
| -d | --duration= | URL validity duration. Different format (e.g., 10m). |
| -m | --http-verb= | HTTP method (e.g., GET, PUT). |
| -c | --headers=content-type=<CONTENT_TYPE> | Content-Type header. Part of repeatable --headers flag. |
| -p | --private-key-password= | Password for encrypted private key. |
| -r | --region= | Resource region. |
| -b | --query-params=userProject= | Billing project for Requester Pays. |
Equivalent to gcloud storage objects list --stat --fetch-encrypted-object-hashes.
- Output Formatting: Output format differs, with known spacing issues. Scripts parsing
gsutil statoutput may need adjustments.
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil ubla get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="default(iamConfiguration.uniformBucketLevelAccess)" | Displays UBLA config. |
gsutil ubla set -> gcloud storage buckets update
| gsutil Argument | gcloud storage Flag | Notes |
|---|---|---|
| on | --uniform-bucket-level-access | Enables UBLA. |
| off | --no-uniform-bucket-level-access | Disables UBLA. |
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil versioning get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="default(versioning)" | Displays versioning config. |
gsutil versioning set -> gcloud storage buckets update
| gsutil Argument | gcloud storage Flag | Notes |
|---|---|---|
| on | --versioning | Enables versioning. |
| off | --no-versioning | Disables (suspends) versioning. |
Replaced by gcloud storage buckets describe and gcloud storage buckets update.
gsutil web get -> gcloud storage buckets describe
| gsutil Command | gcloud storage Command | Notes |
|---|---|---|
| get | describe --format="default(website)" | Displays website config. |
gsutil web set -> gcloud storage buckets update
| gsutil Flag | gcloud storage Flag | Notes |
|---|---|---|
| -m <main_page_suffix> | --web-main-page-suffix=<MAIN_PAGE_SUFFIX> | Main page suffix. |
| -e <error_page> | --web-error-page=<ERROR_PAGE> | Not-found (404) page. |
| (no flags) | --clear-web-main-page-suffix and --clear-web-error-page | Clears website config. |
The following gsutil commands do not have direct translations in gcloud storage as their functionality is gsutil-specific or handled differently within the gcloud ecosystem:
- config: Manages gsutil-specific configurations.
gcloudhas its ownconfiggroup. - version: Displays gsutil version. You can use
gcloud -vinstead. - help: gsutil-specific help. You can use
gcloud help. - perfdiag: gsutil-specific performance diagnostics. While not a direct mapping,
gcloud alpha storage diagnosecan be used instead. - test: Runs gsutil tests.
- update: Updates gsutil. gcloud components are updated via
gcloud components update.