|
| 1 | +## stackit alpha bucket cp |
| 2 | + |
| 3 | +Copies objects between local and Object Storage |
| 4 | + |
| 5 | +### Synopsis |
| 6 | + |
| 7 | +Copies a single object or a directory tree between local storage and Object Storage. |
| 8 | + |
| 9 | +One of SRC and DESTINATION must be a bucket URI (s3://BUCKET[/KEY]) or a STACKIT |
| 10 | +Object Storage URL (https://BUCKET.object.storage.REGION.onstackit.cloud[/KEY]) |
| 11 | +and the other a local path. |
| 12 | +Without --recursive, a single object is transferred. |
| 13 | +With --recursive, all objects under the prefix (download) or all files under the |
| 14 | +local directory (upload) are transferred. |
| 15 | + |
| 16 | +``` |
| 17 | +stackit alpha bucket cp SRC DESTINATION [flags] |
| 18 | +``` |
| 19 | + |
| 20 | +### Examples |
| 21 | + |
| 22 | +``` |
| 23 | + Upload a file to a bucket |
| 24 | + $ stackit alpha bucket cp local/file.txt s3://my-bucket/file.txt |
| 25 | +
|
| 26 | + Download a single object |
| 27 | + $ stackit alpha bucket cp s3://my-bucket/file.txt local/file.txt |
| 28 | +
|
| 29 | + Upload a directory recursively |
| 30 | + $ stackit alpha bucket cp ./local/dir s3://my-bucket/prefix/ --recursive |
| 31 | +
|
| 32 | + Download a prefix recursively |
| 33 | + $ stackit alpha bucket cp s3://my-bucket/prefix/ ./local/dir --recursive |
| 34 | +``` |
| 35 | + |
| 36 | +### Options |
| 37 | + |
| 38 | +``` |
| 39 | + --access-key-id string Object Storage access key ID. Can also be set with the object_storage_access_key_id config key or the STACKIT_OBJECT_STORAGE_ACCESS_KEY_ID environment variable. |
| 40 | + --endpoint string Object Storage API endpoint. Defaults to https://object.storage.<region>.onstackit.cloud. Can also be set with the object_storage_data_plane_custom_endpoint config key or the STACKIT_OBJECT_STORAGE_DATA_PLANE_CUSTOM_ENDPOINT environment variable. |
| 41 | + -h, --help[=true|false] Help for "stackit alpha bucket cp" |
| 42 | + --recursive[=true|false] Transfer a directory tree or all objects under a prefix |
| 43 | + --secret-access-key string Object Storage secret access key. Can also be set with the object_storage_secret_access_key config key or the STACKIT_OBJECT_STORAGE_SECRET_ACCESS_KEY environment variable. |
| 44 | +``` |
| 45 | + |
| 46 | +### Options inherited from parent commands |
| 47 | + |
| 48 | +``` |
| 49 | + -y, --assume-yes[=true|false] If set, skips all confirmation prompts |
| 50 | + --async[=true|false] If set, runs the command asynchronously |
| 51 | + -o, --output-format string Output format, (one of: [json, pretty, none, yaml]) |
| 52 | + -p, --project-id string Project ID |
| 53 | + --region string Target region for region-specific requests |
| 54 | + --verbosity string Verbosity of the CLI, (one of: [debug, info, warning, error]) (default "info") |
| 55 | +``` |
| 56 | + |
| 57 | +### SEE ALSO |
| 58 | + |
| 59 | +* [stackit alpha bucket](./stackit_alpha_bucket.md) - Manages objects in STACKIT Object Storage buckets (data plane) |
| 60 | + |
0 commit comments