Content, Filters, and Regular Expressions - FAQ
Why do I need a backup filter?
A good backup filter is essential in achieving your backup and restore objectives and in keeping your protected storage usage to a minimum. A backup filter prevents unnecessary files from being backed up on a client. These are generally temporary files (*.tmp, Cache or Temp directories, etc.) or files that can be recovered from another source (CD, compiling, etc.) that are not essential to system recovery, applications, or to users.
When should I use a filter?
Filters should be used in situations where there is client data that doesn't need to be preserved and can be excluded from data protection and recovery operations. This will increase performance by reducing data protection and recovery time, as well as minimize the expense of storing unnecessary data.
Are there any files or folders automatically filtered during backup?
Yes. In Windows, the swap files (pagefile.sys and _swap_mem) are automatically filtered from backups. In Unix, the /proc folder is automatically filtered. For NAS subclients with content defined at the root level, any snapshot directories are automatically excluded. In all operating systems, any mounted CD/DVD file system is automatically filtered.
What is the benefit of testing the scan phase of a backup?
Testing the scan phase allows you to determine which files/objects would be backed up, the number of objects, time taken for scan, etc., based on your backup options and filters without actually running a backup.
Is there any automatic filtering for restores?
Restore filters are available for some agents which allow you to exclude objects that are not needed to restore the operating system or application. However, before applying these filters, we recommend that you consult with your operating system/application vendors to determine which objects do not need to be restored in order to fully recover the system or application.
What is the benefit of testing a restore job?
Testing a restore job allows you to get a list of all files that would be restored without actually restoring them, based on your restore selections and filters.
Using regular expressions (or wildcards) to define content and/or filters can be helpful in situations where a pattern of objects can be included or excluded from data protection operations, without having to specify every single object that falls into that pattern. For example, rather than typing in all file names with an extension of type "doc", you can type in *.doc.
Regular expression characters can be treated as literal characters by "escaping" the interpretation of a regular expression. For example: to filter out a directory named C:\[MyFolder] you would need to escape the first bracket to allow its literal interpretation. Otherwise, you would be filtering the directories C:\M, C:\y, C:\F, C:\o, etc.
The Escape character is '/' for Windows-style paths ("opposite" path delimiter of '\'), and '\' everywhere else. Hence to filter out C:\[MyFolder] use C:\/[MyFolder] (note that the \/ is a backslash forward-slash, not a capital V). On Unix, use /\[MyDirectory] to filter out /[MyDirectory].
In the exclude field you can use the following wildcard characters:
|*||Substitute for any number of characters (for example: *.doc)|
|?||Substitute for any single character (for example: *.?df)|
|[ ]||Any range of characters (for example: [a-m]*.doc)|
|[! ] or [^]||Negates the range of characters (for example: [!ei]nsure.doc or [^fg]oo.out)|
|**||Any directory level (for example: C:\**\temp)|
There should be no noticeable difference in performance for filters that use regular expressions, literal paths, or any combination thereof.
Some system state files can be filtered out of backups and restores. For more information, refer to Configuring System State Backups for Windows File System.
Filters can be used in conjunction with the "Items That Failed" list on the data protection Job History Report to eliminate backup or archive failures by excluding items which consistently fail that are not integral to the operation of the system or applications. Some items fail because they are locked by the operating system or application and cannot be opened at the time of the data protection operation. This often occurs with certain system-related files and database application files.
Also, keep in mind that you will need to run a full backup after adding failed files to the filter in order to remove them.
One of the best ways to determine which files to filter is to review the backup file list for each subclient. When you perform your first full backup of a subclient, examine the backup file list to verify your intended content is there. If you don't see the files you need, re-define the content. If you see files you don't need, then filter them out.
After your first incremental backup, examine the backup file list again. Are there any more files you don't need? If so, filter them out. Continue to examine your incremental backup file list after the next few backups until you are satisfied that your filters excluding the specified data and you are capturing only the data you want protected.
Another filtering tool is the failed file list. It should always be reviewed for possible changes to your filters. Optimally, if you implement your filters correctly, you should not have any failed files or directories in a backup. Failed files are often transitional or temporary files that are not required for restore. However, they can include production files that are locked open by a user or application. You can back up open files using software utilities such as Microsoft's Volume Shadow Service or QSnap.
An entire directory can be filtered out of data protection operations if you do not wish to preserve any of the data in that directory or in any of its subdirectories. Temporary working directories often fall into this category.
How do I filter all directories starting with a particular word?
To filter all directories that begin with a particular word on all drives (e.g. My_Filter), use the global filter:
Or use the subclient filter as follows if you know the drive letter to the filter:
How do I filter all temporary directories?
To filter every directory named temp on all drives, use the global filter:
Or use the subclient filter:
Do not use "temp*" when you need to filter temp, as it will get "template" and other directories with the word "temp".
How do I filter a fixed USB disk?
To filter USB drives that are fixed disks, use:
How do I filter all Recycle Bin directories?
To filter every Recycle Bin directory on all drives, use:
To filter the Recycle Bin directory on a particular drive, use:
For example, to filter the Recycle Bin directory on the C: drive, use:
To filter the Recycle Bin directory on a UNC path, use:
For example, to filter the Recycle Bin directory on hfiler.domain.company.com , use: