mc retention info

Displays retention information for a bucket or object.

Syntax

CLI
mc retention info [FLAGS] [governance | compliance] VALIDITY TARGET

FLAGS:
  --recursive, -r                  show retention info recursively
  --version-id value, --vid value  show retention info of specific object version
  --rewind value                   roll back object(s) to current version at specified time
  --versions                       show retention info on object(s) and all its versions
  --default                        show bucket default retention mode
  --json                           enable JSON lines formatted output
  --debug                          enable debug output
  --insecure                       disable SSL certificate verification
  --help, -h                       show help

Parameters

Parameter Description
recursive Displays retention information recursively for all objects
version-id Displays retention information only for the specified version of the object
rewind Rollback objects to the version that was present in the specified point of time
versions Displays retention information for all versions of the object
default Show the default retention mode for the bucket
json Enable JSON formatted output
debug Enable output for debugging
insecure Disable SSL verification
help Show this help

Examples

  1. Display the default retention mode for a bucket named finance:
    CLI
    /opt/mapr/bin/mc retention info newmooss/finance --default
    
       GOVERNANCE mode is enabled for 1DAYS.
  2. Display retention info for a specific version of an object:
    CLI
    /opt/mapr/bin/mc retention info newmoss/worm2/f2 --version-id 00000000000000000004
    
       Name : newmoss/worm2/f2
       Version : 00000000000000000004
       Mode : GOVERNANCE, expiring in 19 days