Skip to content

[BUG] mc mirror will overwrite the same key in target minio bucket #5192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sheiy opened this issue Apr 22, 2025 · 0 comments · May be fixed by #5193
Open

[BUG] mc mirror will overwrite the same key in target minio bucket #5192

sheiy opened this issue Apr 22, 2025 · 0 comments · May be fixed by #5193

Comments

@sheiy
Copy link

sheiy commented Apr 22, 2025

Expected Behavior

mc mirror --watch m2/from m1/tot
the key in bucket of from should not overwrite the key in tot bucket

Current Behavior

the key in bucket of from overwrite the key in tot bucket

Steps to Reproduce (for bugs)

  1. run 2 minio server and 1 minio client
docker run -itd --name minio1 \
    -p 19000:19000 -p 19001:19001                 \
    --env MINIO_CONSOLE_PORT_NUMBER="19001" \
    --env MINIO_API_PORT_NUMBER="19000" \
    bitnami/minio:latest


    docker run -itd --name minio2 \
    -p 29000:29000 -p 29001:29001                 \
    --env MINIO_CONSOLE_PORT_NUMBER="29001" \
    --env MINIO_API_PORT_NUMBER="29000" \
    bitnami/minio:latest



    docker run -it --rm --name minio-client \
    --network host \
    bitnami/minio-client \
    bash
  1. set alias m1 and m2 in minio-client bash exec
    mc alias s m2 http://host.docker.internal:29000 UCT7IcRVcPkwTH8HiQxM qrob0lPKuQXOWXm6KAoKZ2rQ9L9Fb2Cdclf2dR5b
    mc alias s m1 http://host.docker.internal:19000 zCcEb0HhhYMxR7yg8v0P tvMu62i3gaWKTu4KoWO03JBEVl0OUyLOkzGrOt7j
  2. start mirror
    mc mirror --watch m2/from m1/tot
  3. upload a key named 1.txt(content is 1) to m1's tot bucket with console
  4. upload a key named 1.txt(content is 12) to m2's from bucket with console
  5. the m1's tot bucket key of 1.txt will change

Context

I want to cp all keys from m2's 'from' bucket to m1's tot bucket

Your Environment

  • Version used (minio --version): minio version DEVELOPMENT.2025-04-08T15-41-24Z (commit-id=d0cada583fce88f60cb276ddfb06f5cb16820069)
  • Server setup and configuration: see docker cmd
  • Operating System and version (uname -a): Linux 2abac2c0f4fd 6.13.7-orbstack-00283-g9d1400e7e9c6 minio/minio#104 SMP Mon Mar 17 06:15:48 UTC 2025 aarch64 GNU/Linux
  • mc version minio/stable/mc RELEASE.2025-04-08T15-39-49Z_1
@jiuker jiuker transferred this issue from minio/minio Apr 22, 2025
@dormanze dormanze linked a pull request Apr 23, 2025 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant