Add --action for mc undo
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
@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 (
DELETExorPUT) to objectmyminio/bucket/prefix/somefile.zip
Or maybe
Undo the most recent change (
DELETExorPUT) to any object atmyminio/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.
@jiuker I think
mc undo --actionneeds an example in the docs because of the narrow case where it works. I'm not entirely clear how it interacts with--recursiveor why it only works recursively.Is it like this?
Revert the most recent change (
DELETExorPUT) to objectmyminio/bucket/prefix/somefile.zipOr maybe
Undo the most recent change (
DELETExorPUT) to any object atmyminio/bucket/prefixPerhaps both of those are wrong, I am not sure.
More generally, does
--recursiveonly 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.
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
Reworked some small things for clarity throughout.