Trying to configure CTA to archive Unity Files to ECS. I am generally not impressed with the documentation available to do some specific, common tasks.
One of those tasks is how to create a policy that archives files based upon common file attributes such as last accessed/modified date, file size, filename extension, etc. It's not jumping out to me how to create these common policies.
Any insights from anybody?
A Policy is basically a set of rules. You can have a single or multiple rules in a single polity. Each of the rules define two thing:
Basically this gives CTA the ability to have a single policy to archive desired files to desired destinations. For example, we can define a policy with two rules. One to archive all file older than 3 months and less then 1GB to a NAS tier which is in prem and a second rule which will archive all file older than 3 months and larger than 1GB to Cloud.
When creating a rule you have multiple File Attributes using which you can create rules to select appropriate files to archive. The available File Attributes are:
All time related attributes support >, >=, <, <= operators and the units are in days, weeks months or years. So if you want to select all file which were last accessed before 3 months. You can create a rule saying Accessed Time >= 3 months. Same applies to Access Time and Modified Time.
The Size attribute supports same operators as Time attributes and the units are in Bytes, KB, MB, GB and TB. Basically if you wan to create a rule to select all the files which are larger than say 1GB and archive them you can use this attribute.
File Name attribute support equal and regex operators. Equal operator is basically used to select specific file to archive and regex can be used to select multiple files which match the regex value. There is no units for the File Name attribute.
Directory Name attribute is similar to File Name attribute, with an exception of singlefile operator. Equal operator to can be used to match a particular directory and all files in it will be selected for archive. Regex can be used to select multiple directories in a give path and all files from those directories will be selected for archive.
So using a combination of File Attributes users can frame complex expressions which will allow them to select files based on how old they are and what size they should be and files from which directories should be scanned and what filename or types should be selected for archive.