mc icon indicating copy to clipboard operation
mc copied to clipboard

Rename objects prefix

Open vincent-herlemont opened this issue 2 years ago • 0 comments

Context

  • Minio Standalone
  • Concern about performance for this action
    • 10 Millon files
    • Between 1K to 1G
    • 10 To

Expected behavior

I would like to update prefix object bulk. For example I would rename the prefix_2to prefix_3 from

[2022-05-06 16:45:34 UTC] 6.4KiB STANDARD prefix_1/filename_1
[2022-05-06 16:45:34 UTC] 1.8KiB STANDARD prefix_1/filename_2
[2022-05-06 16:45:34 UTC] 121KiB STANDARD prefix_2/filename_3
[2022-05-06 16:45:34 UTC] 121KiB STANDARD prefix_2/filename_4

Expected result:

[2022-05-06 16:45:34 UTC] 6.4KiB STANDARD prefix_1/filename_1
[2022-05-06 16:45:34 UTC] 1.8KiB STANDARD prefix_1/filename_2
[2022-05-06 16:45:34 UTC] 121KiB STANDARD prefix_3/filename_3
[2022-05-06 16:45:34 UTC] 121KiB STANDARD prefix_3/filename_4

Actual behavior / Steps to reproduce the behavior

I try to use the combinaison of mc mv and mc mb to achieve that.

# Create `test_3` prefix
$> mc mb minio/bucket/test_3
# Move objects
$>  mc mv --recursive minio/bucket/test_2/ minio/bucket/test_3/

That works :heavy_check_mark: but ...

Questions

  • Regarding the concern about performance in the section context of this issue. Is there a better solution than these two actions mc mv and mc mb ?
  • There is any concerns about mc mv in minio? Decrease performance? Increase the size of the buckets etc?

System information

vincent-herlemont avatar May 06 '22 20:05 vincent-herlemont

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 12 '22 04:08 stale[bot]

There is no move/rename functionality in S3, so an operation like this will always be rather expensive, and you shouldn't rely on this for everyday tasks.

klauspost avatar Aug 22 '22 11:08 klauspost