mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-08 18:45:13 +00:00
107 lines
3.7 KiB
Text
107 lines
3.7 KiB
Text
NAME
|
|
gcloud alpha storage cp - upload, download, and copy Cloud Storage objects
|
|
|
|
SYNOPSIS
|
|
gcloud alpha storage cp SOURCE [SOURCE ...] DESTINATION
|
|
[--cache-control=CACHE_CONTROL]
|
|
[--content-disposition=CONTENT_DISPOSITION]
|
|
[--content-encoding=CONTENT_ENCODING]
|
|
[--content-language=CONTENT_LANGUAGE] [--content-md5=MD5_DIGEST]
|
|
[--content-type=CONTENT_TYPE] [--custom-metadata=[CUSTOM_METADATA,...]]
|
|
[--custom-time=CUSTOM_TIME] [--do-not-decompress]
|
|
[--if-generation-match=GENERATION]
|
|
[--if-metageneration-match=METAGENERATION] [--ignore-symlinks]
|
|
[--recursive, -R, -r] [GCLOUD_WIDE_FLAG ...]
|
|
|
|
DESCRIPTION
|
|
(ALPHA) Copy data between your local file system and the cloud, within the
|
|
cloud, and between cloud storage providers.
|
|
|
|
EXAMPLES
|
|
The following command uploads all text files from the local directory to a
|
|
bucket:
|
|
|
|
$ gcloud alpha storage cp *.txt gs://my-bucket
|
|
|
|
The following command downloads all text files from a bucket to your
|
|
current directory:
|
|
|
|
$ gcloud alpha storage cp gs://my-bucket/*.txt .
|
|
|
|
The following command transfers all text files from a bucket to a different
|
|
cloud storage provider:
|
|
|
|
$ gcloud alpha storage cp gs://my-bucket/*.txt s3://my-bucket
|
|
|
|
Use the --recursive option to copy an entire directory tree. The following
|
|
command uploads the directory tree dir:
|
|
|
|
$ gcloud alpha storage cp --recursive dir gs://my-bucket
|
|
|
|
POSITIONAL ARGUMENTS
|
|
SOURCE [SOURCE ...]
|
|
The source path(s) to copy.
|
|
|
|
DESTINATION
|
|
The destination path.
|
|
|
|
FLAGS
|
|
--cache-control=CACHE_CONTROL
|
|
How caches should handle requests and responses.
|
|
|
|
--content-disposition=CONTENT_DISPOSITION
|
|
How content should be displayed.
|
|
|
|
--content-encoding=CONTENT_ENCODING
|
|
How content is encoded (e.g. gzip).
|
|
|
|
--content-language=CONTENT_LANGUAGE
|
|
Content's language (e.g. en signifies "English").
|
|
|
|
--content-md5=MD5_DIGEST
|
|
Manually specified MD5 hash digest for the contents of an uploaded
|
|
file. This flag cannot be used when uploading multiple files. The
|
|
custom digest is used by the cloud provider for validation.
|
|
|
|
--content-type=CONTENT_TYPE
|
|
Type of data contained in the object (e.g. text/html).
|
|
|
|
--custom-metadata=[CUSTOM_METADATA,...]
|
|
Custom metadata fields set by user.
|
|
|
|
--custom-time=CUSTOM_TIME
|
|
Custom time for Google Cloud Storage objects in RFC 3339 format.
|
|
|
|
--do-not-decompress
|
|
Do not automatically decompress downloaded gzip files.
|
|
|
|
--if-generation-match=GENERATION
|
|
Execute only if the generation matches the generation of the requested
|
|
object.
|
|
|
|
--if-metageneration-match=METAGENERATION
|
|
Execute only if the metageneration matches the metageneration of the
|
|
requested object.
|
|
|
|
--ignore-symlinks
|
|
Ignore file symlinks instead of copying what they point to. Symlinks
|
|
pointing to directories will always be ignored.
|
|
|
|
--recursive, -R, -r
|
|
Recursively copy the contents of any directories that match the source
|
|
path expression.
|
|
|
|
GCLOUD WIDE FLAGS
|
|
These flags are available to all commands: --access-token-file, --account,
|
|
--billing-project, --configuration, --flags-file, --flatten, --format,
|
|
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
|
--trace-token, --user-output-enabled, --verbosity.
|
|
|
|
Run $ gcloud help for details.
|
|
|
|
NOTES
|
|
This command is currently in alpha and might change without notice. If this
|
|
command fails with API permission errors despite specifying the correct
|
|
project, you might be trying to access an API with an invitation-only early
|
|
access allowlist.
|
|
|