9.1 Understanding Policies

Policies define what files to move and the direction to move them. You can associate a policy schedule with a policy to specify an automatic run time. You can also run the policy manually by using the Execute now option.

You can associate a policy with one or more pairs. You can associate a pair with none, one, or more policies. Dynamic File Services moves files between the primary path and the secondary path when its associated policies are enforced. When a file is moved, it remains in the destination location until a policy moves it in the other direction.

The rules defined in the policy are enforced when the policy is run. By creating different policies for a pair, you can move files that meet different conditions. If you configure multiple policies for a pair to run at the same time, the policy engine does the following:

  1. Groups the policies according to the direction that the data is being moved: From primary to secondary or from secondary to primary.

  2. Scans the primary path, and enforces policies that move files to the secondary path.

  3. Scans the secondary path, and enforces policies that move files to the primary path.

The following sections describe the policy settings:

9.1.1 Policy Name and Description

Each policy name must be unique to the DynamicFS server. If you plan to export a policy for use across multiple DynamicFS servers, the name should be unique across all of the servers.

Table 9-1 Policy Name and Description Options

Option

Description

Policy Name

Policy names can be up to 32 characters.

For information about naming restrictions, see Section 4.12, Naming Conventions for Pairs and Policies.

Description

If desired, you can add a more detailed human-interpretable description of the policy.

9.1.2 Policy Direction

The Policy Direction option determines whether the policy is enforced against files on the primary path or the secondary path. The policy run scans the original location to discover files that meet the filter criteria, then moves those files to the destination location. If all of the specified filter options in the policy are true for a file, the file is moved in the specified direction.

For example, if you are moving data from primary to secondary, the policy is enforced against the files on the primary path. If all of the selected filter options are true for a file, the file is moved from the primary path to the secondary path.

Table 9-2 Policy Direction Options

Option

Description

Primary to Secondary

The policy is enforced against the files in the primary location. Files that match the policy rules are moved from the primary path to the secondary path. This is the default.

Secondary to Primary

The policy is enforced against the files in the secondary location. Files that match the policy rules are moved from the secondary path to the primary path.

At run time, the policies for a pair are grouped by direction. The primary-to-secondary group of policies are run on the primary location, and then the secondary-to-primary group of policies are run on the secondary location. It is possible for a file to move from primary to secondary based on rules in the first group of policies, then move from secondary to primary based on rules in the second group of policies.

9.1.3 Policy Filter Options

The Policy Filter options specify the rules that determine which files are to be moved by the policy. The filters in a policy apply to all files unless you enable the File patterns option or the File types option.

When a policy is enforced, a file is moved only if it satisfies all of the filter options set for that policy. (That is, the filters in a given policy are enforced as AND operations.)

When multiple policies are enforced in a single run, a file is moved if it satisfies the rules in any one of the policies in that group. (That is, multiple concurrently scheduled policies are enforced as OR operations.)

There are no default policy filters. You must enable and configure at least one of the following filter options in each policy. For examples of how to create policy rules to achieve your storage goals, see Section 9.14, Examples of Policy Rules.

File Size

You can use the File size option to move a file only if its size is greater than or less than the specified file size. File size is specified in bytes, kilobytes, megabytes, or gigabytes.

Last Accessed

You can use the Last accessed option to move a file only if the elapsed time since it was last accessed is greater than or less than the specified time period. Time is specified in days, weeks, months, or years.

Last Modified

You can use the Last modified option to move a file only if the elapsed time since it was last modified is greater than or less than the specified time period. Time is specified in days, weeks, months, or years.

File Patterns

You can use the File patterns option to evaluate the file name and extension of files in the pair. The rule moves a file only if the file matches any one of the specified file patterns. If you specify other filter options, only files that satisfy the pattern and that also meet the other criteria are moved.

IMPORTANT:The File patterns option and the File types option cannot be used together.

Regular expressions that you use in the File patterns field work like expressions you might use in the dir function on the Windows command line. The asterisk (*) is a wildcard character can be used to represent a sequence of any number of characters in the name. The question mark (?) character can be used to represent a single character.

The pattern search is case insensitive.

Separate multiple file patterns with a comma and no spaces. If you include spaces in a pattern, the spaces are interpreted as part of the pattern you seek.

Examples

These two search patterns find the same files:

*aBa_*
*ABA_*

In the following patterns, spaces within a pattern are considered part of the file name. The spaces after a comma are part of the next pattern.

test many files*, many*, 12??*,dsw*.?2*

In the following patterns, the asterisk is used for the file name to indicate that files with a specified extension should be moved:

*.mp3,*.png,*.jpg

To move all files with and without extensions, specify All files (*.*) in the File patterns field.

To move files with no extension, specify *. in the File patterns field.

Table 9-3 shows examples of regular expressions that are used as file patterns and the files found:

Table 9-3 Sample File Patterns

File Pattern

File Found

*jpg*

testjpg.txt

test.?

test.1

proc*test.jpg

procisatest.jpg

*_?.text

p_1.text

*ap*.???

apache.aaa

File Types

Applications typically use different file extensions for the same logical types of file content, such as videos, images, and documents. The File types option allows you to move files based on a file type rather than exhaustively listing every file extension that fits that profile. You can specify one or more file types in a policy.

IMPORTANT:The File types option and the File patterns option cannot be used together.

A file types policy moves a file only if the file’s extension matches one of the extensions associated with any one of the specified types. Because an extension can be altered by a user to avoid detection, you can alternatively read the file’s content information to determine its type by selecting the Use file content to determine type check box.

IMPORTANT:Checking the file content increases the time needed to process the files during a policy run.

In Dynamic File Services, the File Types filter uses categories based on MIME types and Microsoft perceived types. You can also define categories to suit your environment. When a policy is run, Dynamic File Services considers the following resources to identify the file type categories and their related file extensions:

File Owners

You can move files based on file ownership. In the Users and Groups browse view, you can select the user names and group names to add to the policy. The user names, group names, and group memberships are verified before each run. Only user names and group names that are valid when the run begins are used for the run. For groups, only user names that are members of the group when the run begins are used for the run.

Dynamic File Services can also move ownerless files. Files are considered to be ownerless if the user name or group name has been removed from the Active Directory domain or the server’s Users and Groups list. A file retains the Security Identifier (SID) of that user or group even after the associated name becomes invalid. You can move ownerless files by selecting the {No owners} entry in the Select Users > Users or Groups dialog box.

In the pre-run check, Dynamic File Services uses the metadata status that is known to the NTFS file system at that time to verify which names are valid, and then uses the valid names for the policy run. It does not re-verify the names during the run. If name and membership changes are synchronized to NTFS while the policy is running, the changes are not considered until the next policy run.

9.1.4 Schedule to Policy Association

The policy can be scheduled to run periodically, or you can execute it on demand. A single policy can be associated with single schedule. A single schedule can be associated with multiple policies. When multiple policies are scheduled to run at the same time, they are enforced as a group for each pair that is associated with them.

For information about creating policy schedules and associating them with policies, see Section 10.0, Creating and Managing Policy Schedules.

9.1.5 Pair to Policy Associations

No data is moved between the primary and secondary locations in a pair until you associate it with at least one policy. A policy must be associated with at least one pair before it can be run. A policy is enforced only for its associated pairs. A single policy can be associated with multiple pairs. A single pair can be associated with multiple policies. For instructions, see Section 9.6, Associating or Disassociating Pairs and Policies.

IMPORTANT:A retention pair can be associated with a policy only if the direction is Primary to Secondary. You must use the Review Service to restore a file from the retention repository on the secondary path to its original location on the primary path.

You can configure the Include Folders setting for a pair to specify folders in the pair where its associated policies apply. You can configure the Exclude Folders setting for a pair to specify folders in the pair where its associated policies do not apply. For a given pair, you can include folders or exclude folders, but not both. For information, see Section 8.5, Including or Excluding Folders from a Pair’s Policy Runs.