For the complete documentation index, see llms.txt. This page is also available as Markdown.

copy

Server-side copy an object to a new key or bucket

Usage

ionosctl object-storage object copy [flags]

Aliases

For object-storage command:

[os]

For object command:

[obj]

For copy command:

[cp]

Description

Copy an object to a new key, within the same bucket or into another bucket.

The copy happens entirely SERVER-SIDE: the bytes are never downloaded to your machine and re-uploaded. Both --name (the destination bucket) and --copy-source (the source) must live in the same region/endpoint.

--copy-source names the object being copied and must be in the form /source-bucket/source-key (a leading slash, then the bucket, then the key). The destination is --name plus --key. Copying onto an existing key overwrites it; on a versioning-enabled destination bucket the copy becomes a new version.

Common uses: rename or move an object (copy to the new key, then delete the old one), or duplicate an object into another bucket. The command prints the new object's ETag and LastModified on success.

Options

Examples

Last updated

Was this helpful?