Retention Policy AVCLI Commands
You can find general information on retention policy (or Information Lifecycle Management) related AVCLI commands.
APPLY RETENTION POLICY
Use the APPLY RETENTION POLICY command to apply a retention policy to a target. This can be applied only by a super auditor.
To apply a retention policy to a target.
Syntax
APPLY RETENTION POLICY <policy name> TO TARGET <target name>
This command applies a specific retention policy to a specified target.
Arguments
| Argument | Description |
|---|---|
| policy name | The name of the policy on which the retention policy needs to be applied. |
| target name | The name of specified target for which the policy needs to be applied. |
Example
apply retention policy test_policy1 to target test_target1;
Applies policy test_policy1 to target test_target1.
CREATE RETENTION POLICY
Use the CREATE RETENTION POLICY command to create a retention (or lifecycle) policy. This can be created only by a super administrator.
To create a retention policy.
Syntax
CREATE RETENTION POLICY <policy name> ONLINE MONTHS <month number> ARCHIVED MONTHS <month number>
This command creates a retention policy with the specified name and specifies the number of online months and archived months. A policy name cannot be null, start with reserved name, or be the same as an existing policy name. Only alphanumeric, underscore (_), dollar sign ($), and pound sign (#) are allowed for the policy name.
Arguments
| Argument | Description |
|---|---|
policy name |
The name of the policy to be created. |
month number |
The number of months to be online or to be archived. The number of months for online, must be between 1 and 9000. The number of months to be archived, must be between 0 and 9000. Note: In case the above guidelines for the number of months (online and to be archived) are not followed, then an error may be observed. |
Example
create retention policy test_policy1 online months 2 archived months 3;
Creates a retention policy with the name test_policy1 and sets 2 months online and 3 months as the archival period.
DELETE RETENTION POLICY
Use the DELETE RETENTION POLICY command to delete a retention policy.
To delete a retention policy.
Syntax
DELETE RETENTION POLICY <policy name>
This command deletes the specified retention policy.
Arguments
| Argument | Description |
|---|---|
| policy name | The name of the retention policy to be deleted. |
Example
delete retention policy test_policy1;
Deletes test_policy1.
LIST RETENTION POLICIES
Use the LIST RETENTION POLICIES command to view all the retention policies.
To view all the retention policies.
Syntax
LIST RETENTION POLICIES
This command lists all retention policies.
Example
list retention policies;
Lists all the retention policies.
SET RETENTION POLICY AS DEFAULT
Use the SET RETENTION POLICY command to set a retention policy as default.
Syntax
SET RETENTION POLICY <policy name> AS DEFAULT
This command sets the specified retention policy as default.
Arguments
| Argument | Description |
|---|---|
| policy name | The name of the retention policy to be set as default. |
Example
set retention policy '1 month online, 0 month in archive' as default;
Sets the policy 1 month online, 0 month in archive as the default policy.
SHOW RETENTION POLICY FOR TARGET
Use the SHOW RETENTION POLICY FOR TARGET command to display the current retention policy defined for the specified target.
To view the lifecycle policy defined for the specified target.
Syntax
SHOW RETENTION POLICY FOR TARGET <target name>
This command displays the current retention policy for the specified target.
Arguments
| Argument | Description |
|---|---|
| target name | The name of specified target for which the policy needs to be viewed. |
Example
show retention policy for target test_target1;
Displays the current policy for test_target1.