Creating a Copy of an Object

Create a copy of an object in an Object Storage bucket.

For more information, see Copying Objects.

    1. Open the navigation menu and click Storage. Under Object Storage & Archive Storage, click Buckets.
    2. Choose the compartment that contains the bucket, and then click the name of the bucket.
    3. Under Resources, click Objects to display a list of the objects in the bucket.
    4. Click the Actions menu (Actions Menu) to the right of the object that you want to copy (the source object), and select Copy.

      The Console checks the IAM policies that are in place to perform this task successfully. If you see a policy missing warning, you can let the Console try to create any missing policies or copy the missing policy details to the clipboard to email your administrator. If you think you have the required policies in place, go ahead and try the copy operation.

    5. In the Copy Object panel, enter the following values:
      • Destination Namespace: The namespace of the destination bucket for the copied object. The namespace string of your tenancy is supplied as the default value.
      • Destination Region: The OCI region that contains the destination bucket for the copied object. Your tenancy must be subscribed to a region for you to copy an object to a bucket in that region.
      • Destination Bucket: The name of the destination bucket for the copied object. Specify an existing target bucket. The copy operation doesn't automatically create buckets.
      • Destination Object Name: Optionally, you can specify a different name for the copied object. By default, the name is the same name as the object that you're copying.
      • Destination Storage Tier: If you're uploading to a Standard tier bucket, you can optionally specify the storage tier to upload the object to Infrequent Access or Archive.
      • Overwrite Rule: Select the overwrite rule appropriate for the copy request. For information about overwrite rule options, see Copy Object Overwrite Rules.

    6. Click Copy Object.

      A Work Request Details dialog box confirms that the copy request was submitted successfully and tracks the status of the request.

  • 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:

    1. Infrequent Access
    2. Archive
    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:

    CopyObject