This topic describes the syntax conventions for file-management rules. These rules can specify how and when the system should automatically move certain files among storage pools, and can, optionally, specify when the system should automatically delete certain files.
You can create a file containing policy rules for automatically moving or deleting files. You can then use this rule file as input to the file-management script that is run at a specified time. See Moving and deleting files automatically for information about running the script.
You can also add comments to the policy. All comments must start with /* and end with */ (for example, /* comment */).
>>-RULE--+-------------+----------------------------------------> '-'rule_name'-' >--+-MIGRATE-FROM-POOL----'source_pool_name'--TO-POOL--'target_pool_name'-+--> '-DELETE-FROM-POOL----'source_pool_name'-------------------------------' >--+--------------------------------------------+---------------> | .-,--------------. | | V | | '-FOR----FILESET----(----'fileset_name'-+--)-' >--+----------------------------------------------------------------------+->< '-WHERE--AGE--+->--+--integer--DAYS--AND--SIZE--+-<--+--integer-+-KB-+-' '->=-' +-<=-+ +-MB-+ +->--+ '-GB-' +->=-+ '-=--'
The following example shows a sample file.
RULE 'MyRule1' MIGRATE FROM POOL 'Premium' TO POOL 'Cheap' WHERE AGE > 30 DAYS AND SIZE > 500MB RULE 'MyRule2' MIGRATE FROM POOL 'Premium' TO POOL 'Cheap' WHERE AGE > 60 DAYS AND SIZE <= 500MB RULE 'MyRule3' MIGRATE FROM POOL 'Cheap' TO POOL 'Premium' WHERE AGE <= 7 DAYS AND SIZE <= 500MB RULE DELETE FROM POOL 'Cheap' FOR FILESET ('temp') WHERE AGE > 365 DAYS
Parent topic: Policy syntax