Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • 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
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
All solutions
    • All solutions for Object Storage
    • Resolving the `Bucket is not empty` error when deleting a bucket
    • Troubleshooting access to a bucket with an assigned security policy
    • Fixing error 429
    • Fixing error 409: `BucketAlreadyExists`
    • Resolving the error of access to S3 buckets from a Yandex Data Processing 1.4 cluster
    • Fixing error 403 (header is not retrieved when using the `OPTION` method)
    • Resolving certificate error
    • Resolving the `GATEWAY_REQUEST_ERROR` error
    • Fixing issues with incorrect MIME types of objects when uploading them to Object Storage
    • Troubleshooting issues with uploading new objects to a bucket
    • How to migrate data from an Object Storage bucket to ice storage
    • How to restrict Object Storage bucket access to a specific Cloud CDN IP address range
    • How to move bucket contents to another bucket in the same folder
    • How to directly access the Object Storage API without using SDK
    • How to view and delete incomplete downloads
    • 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
    • How to recover data deleted from a bucket

In this article:

  • Case description
  • Solution
  1. Object Storage
  2. How to move bucket contents to another bucket in the same folder

How to transfer bucket contents to another bucket in the same folder

Written by
Yandex Cloud
Improved by
kvendingoldo
Updated at December 17, 2025
  • Case description
  • Solution

Case descriptionCase description

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

SolutionSolution

You cannot move your bucket contents to another folder or cloud directly; however, you can use the AWS CLI to copy the contents.

Object Storage supports the server side copy feature.

To move the data, use this command:

aws --endpoint-url=https://storage.yandexcloud.net s3 cp --recursive s3://bucket1/ s3://bucket2/

For this command to run successfully, you need to provide the following instead of the bucket1 and bucket2 placeholders:

  • bucket1: Source bucket to move or copy the data from.
  • bucket2: Target bucket to move or copy the data to.

When you use the AWS CLI for copying data, all objects will be transferred between the buckets directly. The host where you are running aws s3 cp and Object Storage servers will only exchange metadata, i.e., the keys of the objects you transfer. You pay neither for the incoming nor for the outgoing Object Storage traffic because this traffic is considered internal as per the object storage logic.

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

Note

If encryption is enabled in the bucket, all uploaded files will be encrypted with the KMS key specified in the bucket settings.
This process does not involve the server side copy. When copying objects from one bucket to another, they will be uploaded to an intermediate host with the S3 client first, and only then, to the target bucket.

Was the article helpful?

Previous
How to restrict Object Storage bucket access to a specific Cloud CDN IP address range
Next
How to directly access the Object Storage API without using SDK
© 2025 Direct Cursus Technology L.L.C.