Creating a Copy of an Object
Create a copy of an object in an Object Storage bucket.
For more information, see Copying Objects.
oci os object copy --namespace-name <object_storage_namespace> --bucket-name <source_bucket_name> --source-object-name <source_object> --destination-namespace <destination_namespace_string> --destination-region <destination_region> --destination-bucket <destination_bucket_name> --destination-object-name <destination_object_name>
For example:
oci os object copy --namespace-name ansh8lvru1zp --bucket-name photos --source-object-name hummingbird.jpg --destination-namespace ansh8lvru1zp --destination-region uk-london-1 --destination-bucket UK_photos --destination-object-name hummingbird.jpg
If you are uploading to a Standard tier bucket, you can optionally specify the storage tier to upload the object to:
oci os object copy --namespace-name <object_storage_namespace> --bucket-name <source_bucket_name> --source-object-name <source_object> --destination-namespace <destination_namespace_string> --destination-object-storage-tier <destination_object_storage_tier> --destination-region <destination_region> --destination-bucket <destination_bucket_name> --destination-object-name <destination_object_name>
For example:
oci os object copy --namespace-name ansh8lvru1zp --bucket-name photos --source-object-name hummingbird.jpg --destination-namespace ansh8lvru1zp --destination-object-storage-tier Archive --destination-region uk-london-1 --destination-bucket UK_photos --destination-object-name hummingbird.jpg
For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.
Use these API operations to view and manage work requests for copy object operations: