Cloud SDK에는 더 적은 매개변수 조정으로 업로드 및 다운로드 수행 시 gsutil보다 훨씬 빠를 수 있는 새 CLI, gcloud 저장소가 포함되어 있습니다. 이 새 CLI에는 gsutil 사용자에게 익숙한 구문과 명령어 구조가 있지만 근본적으로 여러 중요한 차이점이 있습니다. 이 새로운 CLI로 쉽게 전환할 수 있도록 gsutil은 gsutil 명령어를 동등한 명령어가 있는 경우 gcloud 스토리지 명령어로 변환하는 shim을 제공하고 이에 상응하는 명령어가 없는 경우 gsutil의 일반적인 동작으로 되돌아갑니다.
사용 설정
[GSUtil] 섹션 아래의 .boto 구성 파일에서 use_gcloud_storage=True를 설정합니다.
모든 주요 플랫폼 간의 호환성으로 인해 기본적으로 모든 명령어에 멀티 처리가 사용 설정됩니다(-m 옵션이 항상 gsutil에 포함되는 것과 동일).
3개 이상의 별표(예: ***)는 항상 하나의 별표로 처리됩니다.
gsutil과 달리 gcloud는 동시 호출에서 사용하도록 설계되지 않았으며, 따라서 동시 호출(예: 2개 터미널에서 shim을 동시에 실행)하면 예기치 않은 동작이 발생할 수 있습니다.
버킷에 gs://bucket/nested/foo.txt 객체가 포함되어 있다고 가정하면 gsutil의 와일드 카드 반복자는 gs://bucket/*/nested/*와 같은 URL이 지정된 foo.txt와 일치합니다. shim은 동일한 URL이 지정되면 foo.txt와 일치하지 않습니다.
새 명령어가 gcloud 스토리지 및 shim에서 모두 지원되므로 업데이트됩니다.
유니코드에 문제가 있는 경우 환경 변수 PYTHONUTF8을 1로 설정해 보세요. 특히 Windows 명령줄(CMD)에 도움이 될 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[],[],null,["# Shim for Running gcloud storage\n===============================\n\n\u003cbr /\u003e\n\n| **Important:** gsutil is not the recommended CLI for Cloud Storage. [Use\n| `gcloud storage`](/storage/docs/discover-object-storage-gcloud) commands in the Google Cloud CLI instead.\n\n\u003cbr /\u003e\n\nOverview\n--------\n\nCloud SDK includes a new CLI, gcloud storage, that can be considerably faster\nthan gsutil when performing uploads and downloads with less parameter\ntweaking. This new CLI has a syntax and command structure that is familiar to\ngsutil users but is fundamentally different in many important ways. To ease\ntransition to this new CLI, gsutil provides a shim that translates your gsutil\ncommands to gcloud storage commands if an equivalent exists, and falls back to\ngsutil's usual behavior if an equivalent does not exist.\n\nTo Enable\n---------\n\nSet `use_gcloud_storage=True` in the `.boto` config file under the\n`[GSUtil]` section: \n\n```\n[GSUtil]\nuse_gcloud_storage=True\n```\n\nYou can also set the flag for individual commands using the top-level `-o`\nflag: \n\n```\ngsutil -o \"GSUtil:use_gcloud_storage=True\" -m cp -p file gs://bucket/obj\n```\n\nAvailable Commands\n------------------\n\nThe gcloud storage CLI only supports a subset of gsutil commands. What follows\nis a list of commands supported by the shim with any differences in behavior\nnoted.\n\n### acl\n\n- The `ch` subcommand is not supported.\n\n### autoclass\n\n- Works as expected.\n\n### bucketpolicyonly\n\n- Works as expected.\n\n### cat\n\n- Prints object data for a second object even if the first object is invalid.\n\n### compose\n\n- Works as expected.\n\n### cors\n\n- `get` subcommand prints \"\\[\\]\" instead of \"gs://\\[bucket name\\] has no CORS\n configuration\".\n\n### cp\n\n- Copies a second object even if the first object is invalid.\n\n- Does not support file to file copies.\n\n- Supports copying objects cloud-to-cloud with trailing slashes in the name.\n\n- The all-version flag (`-A`) silently enables sequential execution rather\n than raising an error.\n\n### defacl\n\n- The `ch` subcommand is not supported.\n\n### defstorageclass\n\n- Works as expected.\n\n### hash\n\n- In gsutil, the `-m` and `-c` flags that affect which hashes are displayed\n are ignored for cloud objects. This behavior is fixed for the shim and gcloud\n storage.\n\n### iam\n\n- The `ch` subcommand is not supported.\n\n- The `-f` flag will continue on any error, not just API errors.\n\n### kms\n\n- The authorize subcommand returns informational messages in a different\n format.\n\n- The encryption subcommand returns informational messages in a different\n format.\n\n### labels\n\n- `get` subcommand prints \"\\[\\]\" instead of \"gs://\\[bucket name\\] has no labels\n configuration.\"\n\n### lifecycle\n\n- Works as expected.\n\n### logging\n\n- The get subcommand has different JSON spacing and doesn't print an\n informational message if no configuration is found.\n\n### ls\n\n- Works as expected.\n\n### mb\n\n- Works as expected.\n\n### mv\n\n- See notes on cp.\n\n### notification\n\n- The list subcommand prints configuration information as YAML.\n\n- The delete subcommand offers progress tracking and parallelization.\n\n### pap\n\n- Works as expected.\n\n### rb\n\n- Works as expected.\n\n### requesterpays\n\n- Works as expected.\n\n### rewrite\n\n- The -k flag does not throw an error if called without a new key. In both the\n shim and unshimmed cases, the old key is maintained.\n\n### rm\n\n- `$folder$` delete markers are not supported.\n\n### rpo\n\n- Works as expected.\n\n### setmeta\n\n- Does not throw an error if no headers are changed.\n\n### stat\n\n- Includes a field \"Storage class update time:\" which may throw off tabbing.\n\n### ubla\n\n- Works as expected.\n\n### versioning\n\n- Works as expected.\n\n### web\n\n- The get subcommand has different JSON spacing and doesn't print an\n informational message if no configuration is found.\n\nBoto Configuration\n------------------\n\nConfiguration found in the boto file is mapped 1:1 to gcloud environment\nvariables where appropriate.\n\n### \\[Credentials\\]\n\n- aws_access_key_id: AWS_ACCESS_KEY_ID\n\n- aws_secret_access_key: AWS_SECRET_ACCESS_KEY\n\n- use_client_certificate: CLOUDSDK_CONTEXT_AWARE_USE_CLIENT_CERTIFICATE\n\n### \\[Boto\\]\n\n- proxy: CLOUDSDK_PROXY_ADDRESS\n\n- proxy_type: CLOUDSDK_PROXY_TYPE\n\n- proxy_port: CLOUDSDK_PROXY_PORT\n\n- proxy_user: CLOUDSDK_PROXY_USERNAME\n\n- proxy_pass: CLOUDSDK_PROXY_PASSWORD\n\n- proxy_rdns: CLOUDSDK_PROXY_RDNS\n\n- http_socket_timeout: CLOUDSDK_CORE_HTTP_TIMEOUT\n\n- ca_certificates_file: CLOUDSDK_CORE_CUSTOM_CA_CERTS_FILE\n\n- max_retry_delay: CLOUDSDK_STORAGE_BASE_RETRY_DELAY\n\n- num_retries: CLOUDSDK_STORAGE_MAX_RETRIES\n\n### \\[GSUtil\\]\n\n- check_hashes: CLOUDSDK_STORAGE_CHECK_HASHES\n\n- default_project_id: CLOUDSDK_CORE_PROJECT\n\n- disable_analytics_prompt: CLOUDSDK_CORE_DISABLE_USAGE_REPORTING\n\n- use_magicfile: CLOUDSDK_STORAGE_USE_MAGICFILE\n\n- parallel_composite_upload_threshold: CLOUDSDK_STORAGE_PARALLEL_COMPOSITE_UPLOAD_THRESHOLD\n\n- resumable_threshold: CLOUDSDK_STORAGE_RESUMABLE_THRESHOLD\n\n### \\[OAuth2\\]\n\n- client_id: CLOUDSDK_AUTH_CLIENT_ID\n\n- client_secret: CLOUDSDK_AUTH_CLIENT_SECRET\n\n- provider_authorization_uri: CLOUDSDK_AUTH_AUTH_HOST\n\n- provider_token_uri: CLOUDSDK_AUTH_TOKEN_HOST\n\nGeneral Compatibility Notes\n---------------------------\n\n- Due to its compatibility across all major platforms, multiprocessing is\n enabled for all commands by default (equivalent to the -m option always\n being included in gsutil).\n\n- A sequence of asterisks greater than 2 (i.e. `***`) are always treated as\n a single asterisk.\n\n- Unlike gsutil, gcloud is not designed to be used in parallel invocations,\n and doing so (i.e. running the shim from 2 terminals at once) can lead to\n unpredictable behavior.\n\n- Assuming a bucket contains an object `gs://bucket/nested/foo.txt`,\n gsutil's wildcard iterator will match `foo.txt` given a URL like\n `gs://bucket/*/nested/*`. The shim will not match `foo.txt` given the\n same URL.\n\n- This will be updated as new commands are supported by both gcloud storage\n and the shim.\n\n- If Unicode is having issues, try setting the environment variable\n `PYTHONUTF8` to `1`. Specifically, this may help on the Windows\n command-line (CMD)."]]