policy run
Use the
policy run command to run a policy. Only an admin user can access this command.
Syntax
crcli policy run --policyname <name> --action {securecopy | sync-copy | copy-lock | sync | copy |lock | analyze | securecopyanalyze | shelteredharborcopy} [--appnickname <name> ][--ContentFormat {filesystem | databases | backups} ][--copyname <copyname> ][--excludefiles <"filename"> ][--excludefilepath file path ][--includefiles <"filename"> ][--includefilepath file path ][--relockduration <length of time> ][--storagedatainterface <linterface name> ][--watch <seconds> ]
Parameters
--action ,
-a
{securecopy | sync-copy | copy-lock | sync | copy | lock | analyze | securecopyanalyze | shelteredharborcopy}
(Required) The action that you want the policy to run. The
shelteredharborcopy option is available only if the Sheltered Harbor feature is enabled and is run on a Sheltered Harbor policy.
--appnickname ,
-i
<name>
(Required; used with the analyze action) A meaningful name for the application
--contentFormat ,
-t
{filesystem | databases | backups}
(Optional; used with the analyze action) The type of data to be analyzed
--copyname ,
-c
<copy name>
(Optional; used with the analyze and lock actions) The name of the copy on which you want to perform the action
--excludefilepath ,
-p
<"file path">
(Optional; used with the analyze action) File path to exclude from an analyze operation
--excludefiles ,
-e
<"filename">
(Optional; used with the analyze action) Files to exclude from an analyze operation
--includefilepath ,
-f
<"file path">
(Optional; used with the analyze action) File path to include in an analyze operation
--includefiles ,
-d
<"filename">
(Optional; used with the analyze action) Files to include in an analyze operation
--policyname ,
-n
<policy name>
(Required) The name of the policy that you want to run
--relockduration ,
-r
<length of time>
(Optional) Overrides the retention lock duration that is configured for the policy
--storagedatainterface ,
-s
<interface name>
(Optional) The network storage interface through which CyberSense connects to storage.
--watch ,
-w
<seconds>
(Optional) The interval of seconds that the progress of the job is displayed
Example
[root@cr-system]# crcli policy run --policyname phm-policy --action copy-lock --watch 15
Running Job @: 2021.04.07 16:02:02
Policy : phm-policy
Action : copy-lock
JobID : 606e0fba94422f0001f7c01d
Jobname : copy-lock_1827
Job status :
Job ID Job Name Request Progress Status Details
--------------------------------------------------------------------------------------------
606e0fba94422f0001f7c01d copy-lock_1827 copy-lock 0% Running Starting job copy-lock
606e0fba94422f0001f7c01d copy-lock_1827 copy-lock 100% Success Finished job copy-lock