Learn about how to create filters for inclusion and exclusion of files and folders. You can use logical operators (OR and AND) with supported conditions to create simple filters. You can also combine the Include and Exclude filters using the logical operators to create a combination filter.
Simple include and exclude filter with
File Type and
File/Folder Name
Use the
AND or
OR logical operator to create a simple include filter. For example:
INCLUDE
File Type Matches *.jar, *.logORFile/Folder Name Contains common
In this example, the policy includes the file types with the extensions
*.jar and
*.log and the files or folders with the string
common in their respective names. You can use the same example to create the exclude filter that works in the same manner.
Simple include and exclude filter with
Folder Path
You can create an Include or Exclude filter by specifying the absolute path of the folder. The filter excludes or includes all the files and subfolders that are contained in the specified folder. For example in Windows systems:
In this case, all the files and folders that are contained in the folder path that is specified in the filter are excluded. You can use the same example to create the include filter that works in the same manner.
Combined include and exclude filter
You can combine an include and an exclude filter to create a combined filter. You can also combine multiple filter conditions in an Include filter and then combine this Include filter with an Exclude filter.
The following examples combine the include filter that is based on
File Type and
File Name or Folder Name with the exclude filter that is based on
Folder Path filter condition.
Example 1:
INCLUDE
Folder Path Matches C:\CustomData\ClientA\Product1ORFile/Folder Name Starts with common
EXCLUDE
File Type Matches *.json
ANDModification Date Before February 25 1:36 PM
Example 2:
INCLUDE
File/Folder Name Contains commonORFile/Folder Name Contains _serviceANDFile Type Matches *.zipORFile Type Matches *.jar, *.jsonAND
EXCLUDE
File/Folder Name Starts with product2
ANDFile Type Matches *.jsonORFile Size Less than 1 MB
Backup multiple folders in an asset
You can backup multiple folders in an asset using appropriate conditions in an include filter. You can also combine multiple conditions using
AND and
OR operators.
This filter backs up the contents of the folders that are specified in both
Folder Path fields.
INCLUDE
Folder Path Matches C:\CustomData\ClientA\Product1ORFolder Path Matches C:\CustomData\ClientA\Product2
INCLUDE
Folder Path Matches C:\CustomData\ClientA\Product1ANDFile/Folder Name Matches product1.jarORFolder Path Matches C:\CustomData\ClientA\Product2ANDFile/Folder Name Matches serviceA.jarORFolder Path Matches C:\CustomData\ClientB\Product3\IndexANDFile/Folder Name Matches product3.jar
This include filter backs up the following files:
product1.jar that is available in the folder that is specified in
Product1.
serviceA.jar that is available in the folder that is specified in
Product2.
product3.jar that is available in the folder that is specified in
Product3.
You can use the same example to create the exclude filter that works in the same manner.
Backup all files that contain a pattern
You can backup all files in an asset that contain a pattern in their file name using the
File/Folder Name condition.
INCLUDE
File/Folder Name Contains service
Backup all folders and the files within the folders that contain a pattern
You can backup all folders and its contents that contain a pattern in the file or folder name using the
File/Folder Name condition. For example:
INCLUDE
File/Folder Name Contains logs
The following filters back up all the directories named
Logs: