docs icon indicating copy to clipboard operation
docs copied to clipboard

Add --action for mc undo

Open feorlen opened this issue 1 year ago • 2 comments

Document new option for mc undo to restrict the command to reverse either DELETE or PUT operations, not both.

Staged http://192.241.195.202:9000/staging/DOCS-1113/linux/reference/minio-mc/mc-undo.html

Fixes https://github.com/minio/docs/issues/1113

feorlen avatar Feb 16 '24 22:02 feorlen

@jiuker I think mc undo --action needs an example in the docs because of the narrow case where it works. I'm not entirely clear how it interacts with --recursive or why it only works recursively.

Is it like this?

Revert the most recent change (DELETE xor PUT) to object myminio/bucket/prefix/somefile.zip

Or maybe

Undo the most recent change (DELETE xor PUT) to any object at myminio/bucket/prefix

Perhaps both of those are wrong, I am not sure.

More generally, does --recursive only work on changes that were made to files under a prefix? Maybe that needs an example too.

feorlen avatar Feb 16 '24 23:02 feorlen

@jiuker I think mc undo --action needs an example in the docs because of the narrow case where it works. I'm not entirely clear how it interacts with --recursive or why it only works recursively.

Is it like this?

Revert the most recent change (DELETE xor PUT) to object myminio/bucket/prefix/somefile.zip

Or maybe

Undo the most recent change (DELETE xor PUT) to any object at myminio/bucket/prefix

Perhaps both of those are wrong, I am not sure.

More generally, does --recursive only work on changes that were made to files under a prefix? Maybe that needs an example too.

@feorlen What you said is correct. "--action" just adds the ability to undo the most recent modification, which can be a single file or a directory that contains files.

jiuker avatar Feb 18 '24 02:02 jiuker

Finally picking this up after being delayed by other work.

@jiuker I think I understand now, --action works both with and without --recursive. I added some examples in the text, can you confirm they are accurate?

http://192.241.195.202:9000/staging/DOCS-1113/linux/reference/minio-mc/mc-undo.html#mc.undo.-action

feorlen avatar Mar 21 '24 21:03 feorlen

Reworked some small things for clarity throughout.

feorlen avatar Mar 22 '24 16:03 feorlen