Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI Studio
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
All solutions
    • All solutions for Object Storage
    • Resolving the Bucket not empty error when deleting a bucket from Object Storage
    • Resolving errors of access to a bucket with an assigned security policy
    • Resolving error 429
    • Resolving the "409 BucketAlreadyExists" error
    • Resolving the error of access to S3 buckets from a DataProc 1.4 cluster
    • Resolving error 403 (header is not provided when using the OPTION method)
    • Resolving certificate error
    • Resolving GATEWAY_REQUEST_ERROR
    • Resolving issues with incorrect MIME-types of objects when uploading them to Object Storage
    • Moving data from an Object Storage bucket to an ice storage
    • Restricting access to an Object Storage bucket using an IP range from Cloud CDN
    • Moving bucket contents to another bucket in the same the folder
    • Accessing Object Storage API directly, bypassing the SDK
    • Viewing and deleting incomplete uploads
    • How to determine the speed of data upload and download
    • How to configure cache-control headers for objects in a bucket during HTTP requests
    • How to restrict access to a bucket for a user
    • How to connect your own domain to a bucket
    • How to change the storage class

In this article:

  • Issue description
  • Solution
  1. Object Storage
  2. Moving bucket contents to another bucket in the same the folder

Moving bucket contents to another bucket in the same folder

Written by
Yandex Cloud
Improved by
kvendingoldo
Updated at January 30, 2024
  • Issue description
  • Solution

Issue descriptionIssue description

You need to move your bucket contents to another bucket in the same folder.

SolutionSolution

You can't move your bucket contents to another folder or cloud directly, but you can use the AWS CLI utility to copy the contents.

Object Storage supports the Server Side Copy functionality.
To copy the data, use the command:
aws --endpoint-url=https://storage.yandexcloud.net s3 cp --recursive s3://bucket1/ s3://bucket2/

Before running the above command, make the following substitutions:

  • bucket1 is your source bucket (you copy data from it).
  • bucket2 is your target bucket (you copy data to it).

When you use AWS CLI for copying data, objects will be transmitted between the buckets directly.
The host where you run aws s3 cp and Object Storage servers will only exchange metadata (i.e., the keys of objects transmitted to Object Storage). You pay neither for the incoming nor for the outgoing Object Storage traffic because this traffic is internal from the Object Storage viewpoint.

Note

Similarly, you can copy bucket contents not only to another folder in the same cloud, but to a folder in another cloud as well.
In this case, your IAM account needs to have write access to both buckets.

Was the article helpful?

Previous
Restricting access to an Object Storage bucket using an IP range from Cloud CDN
Next
Accessing Object Storage API directly, bypassing the SDK
© 2025 Direct Cursus Technology L.L.C.