ca_backup - Global Filter Options
Using filters you can include or exclude specific files and directories from your backup jobs. Use the filters to help focus on the files you want. Filters can be applied globally (to the entire job), at the node level (to a specific node), or at the volume level (to a specific filesystem). The position of the -filter switch in the ca_backup command determines the filter level applied.
Important! Incorrect use of filters can result in data being omitted during the backup. Use care when specifying or applying filters!
The ca_backup command includes the following filter options:
ca_backup [-filter
[<include|exclude> <file|dir> <pattern>]]
[<include|exclude> [<attribute> [hidden] [readonly] [system] [archive]]]
[<include|exclude> [<date> <modify|create|access> <onorbefore|onorafter <mm/dd/yy[yy]>>]]
[<include|exclude> [<date> <modify|create|access> <between <mm/dd/yy[yy]> <mm/dd/yy[yy]>>]]
[<include|exclude> [<date> <modify|create|access> <within <count> days|months|years>>]]
[<include|exclude> [<size> <equalto|greaterthan|lessthan> <size val> <Bytes|KBytes|MBytes|GBytes>]]
[<include|exclude> [<size between <<low size val> <Bytes|KBytes|MBytes|GBytes>> <<high size val> <Bytes|KBytes|MBytes|GBytes>>]
include
Results will contain only those files that satisfy the filter specifications. For example, if you select to back up your entire local hard drive, and then set up a filter to include files in the \SYSTEM directory. The result would be that Arcserve Backup would only back up files from your \SYSTEM directory. No other files would be backed up.
exclude
Exclusions always take precedence over inclusions. For example, if you add a filter to include files that have an .exe extension, and add another filter to exclude your \SYSTEM directory, then all the .exe files in the \SYSTEM directory would be excluded.
file|dir <pattern>
Specifies to include or exclude files or directories based on the specified pattern.
- Note: If you select the include directory pattern filter and do not specify an absolute path, empty directories for all the directories that do not match the user provided criteria will be backed up. To avoid creating these empty directories during restore, disable the global restore option Create Empty Directories when creating your restore job.
attribute [hidden] [readonly] [system] [archive]
Specify to include or exclude files with the specified file attribute.
date <modify|create|access> <onorbefore|-onorafter <mm/dd/yy[yy]>>
Specifies to include or exclude files that were modified, changed, or accessed on or before the specified date, or on or after the specified date.
date <modify|create|access> <between <mm/dd/yy[yy]> <mm/dd/yy[yy]>>
Specifies to include or exclude files that were modified, changed, or accessed between the specified dates.
date <modify|create|access> <within <count> days|months|years>
Specifies to include or exclude files that were last modified, changed, or accessed within the specified number of days, months, or years.
size <equalto|greaterthan|lessthan> <size val> <Bytes|KBytes|MBytes|GBytes>
Specifies to include or exclude files whose size is equal, greater or less than the specified size.
size between <<low size val> <Bytes|KBytes|MBytes|GBytes>> <<high size val> <Bytes|KBytes|MBytes|GBytes>>
Specify to include or exclude files whose size is within the specified size range.
Note: For the Global Filter options, the following conditions exist:
- For UNIX servers, Arcserve Backup will automatically interpret the "create" command as specifying the File Change date.
- Modified Time is different than Change Time. Modified Time means the content of a file has changed. Change Time means some properties or attributes of the file has changed (permission changes, owner information, etc), but not the content.
- Not all file systems record change or access dates, therefore some of these Global filters may not be available for your job.
- Arcserve Backup accepts the wildcard characters asterisk ‘*’ and question mark ‘?’ for include and exclude filtering. The asterisk wildcard specifies to match any number of characters. The question mark wildcard specifies to match any one character.
- For example:
- To include/exclude all files with extension ‘tmp’:
- To include/exclude all directories matching the pattern a01???:
-filter include/exclude file *.tmp
-filter include/exclude dir a01???
More information: