mc legalhold set
Sets a legal hold for an object.
Syntax
- CLI
-
mc legalhold set [FLAGS] TARGET FLAGS: --recursive, -r apply legal hold recursively --version-id value, --vid value apply legal hold to a specific object version --rewind value apply legal hold on an object version at specified time --versions apply legal hold on multiple versions of an object --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
Parameters
Parameter | Description |
---|---|
recursive |
Apply the legal hold recursively to all objects. |
version-id |
Apply the legal hold to the specified version of the object. |
rewind |
Rollback objects to the version that was present in the specified point of time. |
versions |
Apply the legal hold to all versions of the object. |
json |
Enable JSON formatted output. |
debug |
Enable output for debugging. |
insecure |
Disable SSL verification. |
help |
Show this help. |
Examples
- Set legal hold on a specific object.
- CLI
-
/opt/mapr/bin/mc legalhold set newmoss/worm2/f2 Object legal hold successfully set for f2.
- Set legal hold for a specific version of an object:
- CLI
-
/opt/mapr/bin/mc legalhold set newmoss/worm2/f2 --version-id 00000000000000000005 Object legal hold successfully set for f2 (version-id=00000000000000000005).