Creates a policy.
>>-mkpolicy--+--------+-- -file--file_name--+-----+-------------> +- -?----+ '- -f-' +- -h----+ '- -help-' >--+---------------------+--+-policy_name-+-------------------->< '- -desc--description-' '- - ---------'
VERSION 1 rule 'stgRule1' set stgpool 'pool1' for fileset ('cnt_A') rule 'stgRule2' set stgpool 'pool2' where NAME like '%.doc' rule 'stgRule3' set stgpool 'pool3' where DAYOFWEEK(CREATION_DATE) == 1 rule 'stgRule4' set stgpool 'pool4' where USER_ID <= 100
The default is an empty string.
You must have Administrator privileges to use the command.
You must be logged in to the operating system on the engine hosting the master metadata server to run this command.
Each policy can be up to 32 KB.
To update the policy rules or attributes through the administrative command-line interface, you must create a new policy.
To edit the rules for an existing policy to use as input to create a new policy, send the output of the catpolicy command for the existing policy to a file and then edit that file. Use the edited file as the input file to the mkpolicy command to create the new policy.
See File placement policy syntax for a description of the syntax conventions for file-placement rules.
sfscli> mkpolicy -file /tmp/my_rules.txt -desc "Test Policy" test_policy Policy test_policy created.
Parent topic: Administrative commands
Related reference
catpolicy
lspolicy
rmpolicy
statpolicy
usepolicy