bm ilm rule edit
Syntax
The bm ilm rule edit command modifies an existing object lifecycle management
rule on a Buckit bucket.
The following command modifies existing lifecycle management rules for
the mydata bucket on the mybuckit deployment:
bm ilm rule edit --id "c79ntj94b0t6rukh6lr0" --expiry-days 90 mybuckit/mydata
bm ilm rule edit --id "c79nu2p4b0t6qko19rgg" --expired-object-delete-marker mybuckit/mydata
bm ilm rule edit --id "c79n19dn10dnab109fg1" --transition-days 30 --tier "COLDTIER"
The command modifies the specified rules as follows:
Delete objects more than 90 days old.
Delete
DeleteMarkertombstones if that object has no other versions remaining.Transition objects more than 30 days old to the
COLDTIERremote tier.
The command has the following syntax:
bm [GLOBALFLAGS] ilm rule edit \
--id "string" \
[--prefix "string"] \
[--enable] \
[--disable] \
[--expire-all-object-versions] \
[--expire-days "string"] \
[--expire-delete-marker] \
[--transition-days "string"] \
[--transition-tier "string"] \
[--noncurrent-expire-days "string"] \
[--noncurrent-expire-newer "string"] \
[--noncurrent-transition-days "string"] \
[--noncurrent-transition-tier "string"] \
[--tags] \
ALIAS
Brackets
[]indicate optional parameters.Parameters sharing a line are mutually dependent.
Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Parameters
- ALIAS
- Required
The alias and full path to the bucket on the Buckit deployment to which to modify the object lifecycle management rule. For example:
bm ilm rule edit mybuckit/mydata
- --id
- Required
The unique ID of the rule. Use
bm ilm rule lsto list bucket rules and retrieve theidfor the rule you want to modify.
- --disable
- Optional
Stop using the rule, but retain the rule for future use. Objects do not transition or expire when a rule is disabled.
- --prefix
- Optional
Restrict the management rule to a specific bucket prefix.
For example:
bm ilm rule edit --prefix "meetingnotes/" mybuckit/mydata --expire-days "90"
The command modifies a rule that expires objects in the
mydatabucket of themybuckitALIAS after 90 days for any object with themeetingnotes/prefix.
- --expire-days
- Optional
The number of days to retain an object after being created. Buckit marks the object for deletion after the specified number of days pass.
Exercise caution when using this option, as its behavior can result in immediate expiration of uploaded objects. Any objects created after the specified expiration date are automatically eligible for expiration. Similarly, specifying a calendar date that is prior to the current system host datetime marks all objects covered by the rule for deletion. Consider immediately removing any ILM rule using this option once the specified calendar date has passed.
For versioned buckets, the expiry rule applies only to the current object version. Use the
--noncurrent-expire-daysoption to apply expiration behavior to noncurrent object versions.Buckit uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.
Mutually exclusive with the following options:
- --expire-delete-marker
- Optional
Specify this option to direct Buckit to remove delete markers for objects with no remaining object versions. Specifically, the delete marker is the only remaining “version” of the given object.
This option is mutually exclusive with the following options:
Buckit uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner and Object Deletion for more information.
- --noncurrent-expire-days
- Optional
The number of days to retain an object version after becoming non-current (i.e. a different version of that object is now the HEAD). Buckit marks noncurrent object versions for deletion after the specified number of days pass.
This option has the same behavior as the S3
NoncurrentVersionExpirationaction.Buckit uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.
- --noncurrent-expire-newer
- Optional
The number of non-current versions of an object to retain before applying expiration. Older non-current versions beyond the specified number expire.
By default, Buckit does not retain any non-current versions when an expiration rule applies.
- --noncurrent-transition-days
- Optional
The number of days an object has been non-current (i.e. replaced by a newer version of that same object) after which Buckit marks the object version as eligible for transition. Buckit transitions the object to the configured remote storage tier specified to the
--transition-tieronce the system host datetime passes that calendar date.This option has no effect on non-versioned buckets. Requires specifying
--noncurrent-transition-tier.This option has the same behavior as the S3
NoncurrentVersionTransitionaction.If the remote tier is another Buckit deployment, you can set the value to
0to mark new objects as immediately eligible for transition to the remote tier.Buckit uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.
- --noncurrent-transition-tier
- Optional
The remote storage tier to which Buckit transitions noncurrent objects versions. Specify a remote storage tier created by
bm ilm tier add.Buckit does not automatically migrate objects from the previously specified remote tier to the new remote tier. Buckit continues to route requests for objects stored on the old remote tier.
- --tags
- Optional
One or more ampersand
&-delimited key-value pairs describing the object tags to which to apply the lifecycle configuration rule.This option is mutually exclusive with the following option:
- --transition-days
- Optional
The number of calendar days from object creation after which Buckit marks an object as eligible for transition. Buckit transitions the object to the configured remote storage tier specified to the
--transition-tier. Specify the number of days as an integer, e.g.30for 30 days. If the remote tier is another Buckit deployment, you can set the value to0to mark new objects as immediately eligible for transition to the remote tier.For versioned buckets, the transition rule applies only to the current object version. Use the
--noncurrent-transition-daysoption to apply transition behavior to noncurrent object versions.Requires specifying
--transition-tier.Buckit uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.
- --transition-tier
- Optional
The remote storage tier to which Buckit transition objects. Specify a remote storage tier created by
bm ilm tier add.Required if specifying
--transition-days.Buckit does not automatically migrate objects from the previously specified remote tier to the new remote tier. Buckit continues to route requests for objects stored on the old remote tier.
Global Flags
This command supports any of the global flags.
Examples
Modify an Existing Lifecycle Management Rule
Use bm ilm rule edit with --id to modify
an existing object expiration rule:
bm ilm rule edit ALIAS/PATH --id "RULEID" [FLAGS]
Replace
PATHwith the path to the bucket on the S3-compatible host.Replace
RULEIDwith the unique ID of the object lifecycle management rule. Usebm ilm rule lsto find theRULEID.Specify any additional flags to add or modify the lifecycle management rule. For example, specify
--transition-daysto override the existing transition days value for the rule.
Disable a Lifecycle Management Rule
Use bm ilm rule edit with --disable to stop using an existing management rule.
bm ilm rule edit --id "RULEID" --disable mybuckit/mybucket
Replace
RULEIDwith the unique ID of the object lifecycle management rule. Usebm ilm rule lsto find theRULEID.Replace
mybuckitwith the ALIAS of the deployment where the rule exists.Replace
mybucketwith the bucket for the rule.
Required Permissions
For permissions required to edit a rule, refer to the required permissions on the parent command.
Behavior
S3 Compatibility
The bm commandline tool is built for compatibility with the AWS S3 API and is tested with Buckit and AWS S3 for expected functionality and behavior.
Buckit provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While bm commands may work as documented, any such usage is at your own risk.