Skip to content
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

feat: support mc mirror --remove alias1/ alias2/bucket/ or mc mirror --remove alias2/bucket alias1/ #5069

Open
jiuker opened this issue Oct 23, 2024 · 3 comments

Comments

@jiuker
Copy link
Contributor

jiuker commented Oct 23, 2024

Expected behavior

when do that command, mc will not compare bucket and delete bucket.

Actual behavior

will remove bucket

Steps to reproduce the behavior

mc.exe alias set source http://192.168.2.12:9000 minioadmin minioadmin
mc.exe mb source/sourcebucket01
mc.exe mb source/sourcebucket02
mc.exe cp issue.sh source/sourcebucket01/testfile01
mc.exe cp issue.sh source/sourcebucket01/testfile02
mc.exe cp issue.sh source/sourcebucket02/testfile03
mc.exe cp issue.sh source/sourcebucket02/testfile04
mc.exe ls -r source

mc.exe alias set target http://192.168.2.12:9001 minioadmin minioadmin

mc.exe mb target/targetbucket01

mc.exe mirror --watch --overwrite source target/targetbucket01
mc.exe ls -r target


mc.exe mb target/targetbucket02

mc.exe mirror --watch --overwrite --remove source target/targetbucket01  <---------- will delete `targetbucket01` here

mc --version

  • (paste output of mc --version)

System information

@jiuker jiuker changed the title feat: Add skip-bucket to mc mirror --remove feat: mc mirror --remove alias1/ alias2/bucket/ Oct 23, 2024
@jiuker jiuker changed the title feat: mc mirror --remove alias1/ alias2/bucket/ feat: mc mirror --remove alias1/ alias2/bucket/ and mc mirror alias2/bucket alias1/ Oct 23, 2024
@jiuker jiuker changed the title feat: mc mirror --remove alias1/ alias2/bucket/ and mc mirror alias2/bucket alias1/ feat: mc mirror --remove alias1/ alias2/bucket/ or mc mirror --remove alias2/bucket alias1/ Oct 23, 2024
@zveinn
Copy link
Contributor

zveinn commented Oct 23, 2024

Are you sure it's not the scanner that's removing the empty bucket ? I remember having this happen to me a while back

@klauspost
Copy link
Contributor

It shouldn't either way ;)

@jiuker
Copy link
Contributor Author

jiuker commented Oct 23, 2024

Are you sure it's not the scanner that's removing the empty bucket ? I remember having this happen to me a while back

Yesh. Sure. Checked from code and reproduce it locally.
@zveinn @klauspost

@jiuker jiuker changed the title feat: mc mirror --remove alias1/ alias2/bucket/ or mc mirror --remove alias2/bucket alias1/ feat: support mc mirror --remove alias1/ alias2/bucket/ or mc mirror --remove alias2/bucket alias1/ Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants