Skip to main content

snaplock event-retention apply

Contributors
Suggest changes

Apply an Event Based Retention policy on all files within a user specified path.

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

The snaplock event-retention apply command starts a new operation to apply the specified Event Based Retention (EBR) policy to all files in the specified path. If a file is a regular file, it will be made a WORM file and retained for a retention-period as defined by the specified policy name. If a file is already WORM, its retention time will be extended to a retention-period as defined by the specified policy name, starting from the current time. The retention time of a file will be extended only if the file's current retention time is less than the new retention time value to be set. Only a user with security login role vsadmin-snaplock is allowed to perform this operation.

Parameters

-vserver <vserver name> - Vserver Name

Specifies the name of the Vserver which has the EBR policy defined to be applied on one or more files.

-policy-name <text> - Policy Name

Specifies the name of the EBR policy to be applied on one or more files.

-volume <volume name> - Volume

Specifies the name of the SnapLock volume containing a file path or a directory path as specified by the path parameter. The specified EBR policy is applied to one or more files depending on the value of path.

-path <text> - Path

Specifies the path relative to the output volume root, of the form "/path". The path can be path to a file or a directory. The EBR policy is applied to all files under the specified path. To apply the EBR policy to all files in a volume, specify the path as "/".

Examples

The following example starts an EBR operation to apply a policy on files for specified volume:

vs1::> snaplock event-retention apply -policy-name p1 -volume slc -path /
                SnapLock event based retention operation is queued. Run "snaplock event-retention show -operation-id 16842754 -instance" to view the operation status.