You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
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
mc mv
command implementation is inconsistent with
mc cp
design. It needs to match
mc cp
implementation as far as retention flags and their implementation go.
mc mv
current implementation looks more complicated compared to
mc cp
design and unnecessarily expects user to know some details, we can keep internal.
Please see
mc cp
usage and implementation.
mc mv
also needs to define a new flag,
--bypass
to bypass governance retention protection like
mc rm
does.
Please see
mc rm
usage and implementation.
Expected behavior
mc mv
usage should look like below for retention related flags:
--retention-mode value retention mode to be applied on the target object (governance, compliance)
--retention-duration value retention duration for the target object in d days or y years
--legal-hold value apply legal hold to the moved to object (on, off)
--bypass bypass governance
EXAMPLES:
16. Move a text file to an object storage with object lock mode set to 'GOVERNANCE' with 1 day retention duration.
$ mc mv --retention-mode compliance --retention-duration 1d locked.txt play/locked-bucket/
17. Move a text file to an object storage with legal-hold enabled.
$ mc mv --legal-hold on locked.txt play/locked-bucket/
18. Bypass object retention in governance mode and move the object.
$ mc mv --bypass play/locked-bucket/pop-songs/ play/locked-bucket/jazz-songs
Actual behavior
Current
mc mv
usage:
--attr value add custom metadata for the object
EXAMPLE:
16. Move a text file to an object storage with object lock mode set to 'GOVERNANCE' with retention date.
$ mc mv --attr "x-amz-object-lock-mode=GOVERNANCE;x-amz-object-lock-retain-until-date=2020-01-11T01:57:02Z" locked.txt play/locked-bucket/
Steps to reproduce the behavior
See retention related flags in
mc mv
,
mc cp
and
mc rm
commands' usage information, their examples and the implementation of their related functions.
mc --version
mc version DEVELOPMENT.2020-05-04T03-29-43Z
Then it is confusing to have an
--attr
flag USAGE example that defines retention mode and duration on an object as shown below:
16. Move a text file to an object storage with object lock mode set to 'GOVERNANCE' with retention date.
$ mc mv --attr "x-amz-object-lock-mode=GOVERNANCE;x-amz-object-lock-retain-until-date=2020-01-11T01:57:02Z" locked.txt play/locked-bucket/
May I suggest to replaced/remove the --attr flag example from the USAGE?