Skip to main content

tcb storage objects mv

Move an object; the server copies it and deletes the source in one call.

v3.4.0+

PG mode storage commands have been available since @cloudbase/cli@3.4.0.

Usage​

tcb storage objects mv <srcKey> <dstKey> -b <bucketId> [--dst-bucket <bucketId>] [--json]

Parameters​

ParameterRequiredDescriptionDefault
<srcKey>YesSource object name—
<dstKey>YesTarget object name—
-b, --bucket <bucketId>YesSource Bucket ID—
--dst-bucket <bucketId>NoTarget Bucket IDSame as the source bucket
--jsonNoOutput the raw SDK result—

Within the same bucket, an identical source and target key is rejected locally with INVALID_PARAM.

Examples​

tcb storage objects mv test/hello.txt archive/hello.txt -b my-bucket