6

We have a Minio cluster that we use as an on-premises object storage. We want to rename a bucket in it. How can I do this?

4 Answers 4

8

IF:

  • you are running a single instance minio
  • you have access to the minio volume directly

Then, yes, it is simply possible by renaming the directory directly.

mv old-bucket.mydomain.example new-bucket.mydomain.example

Explanation

Let's assume minio data is stored in /data/, and we have a bucket called old-bucket.mydomain.example. Then the bucket is stored under /data/old-bucket.mydomain.example directory. Therefore, we can simply rename the directory and it would work!


Update

Please note that, there might be some issues in case of having encryption enabled on the bucket.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, it worked for my single instance minio setup
6

It is not possible to rename buckets: you have to create a new bucket with the desired name, copy over your data mc cp -r minio/oldbucket minio/newbucket and delete the old bucket.

Comments

2

Use mc to create, mirror and delete, here with local as the instance name:

mc mb local/newbucket
mc mirror local/oldbucket local/newbucket
mc rm -r --force local/oldbucket
mc rb local/oldbucket

Comments

-2

Renaming the directory does not alter the metadata. Use the CLI.

1 Comment

For me, it took a few minutes and then the metadata was updated automatically when renaming with mv in a single instance minio (version RELEASE.2025-04-08T15-41-24Z).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.