Bucky Backup - Includes and Excludes in TSM

This document explains how includes and excludes work in the Bucky Backup (TSM) Client.


Include and exclude statements in the TSM config files allow control over what is backed up. They allow you to pick and choose which files you want included in your backups and which to exclude. They also allow other options such as encryption and compression. The TSM client's method of include and exclude statements is powerful but not very easy to use, especially for new users.

Includes and Excludes

Note: Additional information about include and exclude statements can be found here.

Include and exclude statements will go in your dsm.opt on Windows or dsm.sys on Unix/Linux. On Unix/Linux systems, a separate file is often specified with a statement like the following:

	INCLExcl 		/opt/tivoli/tsm/client/ba/bin/inclexcl

Domain Statement

Any filesystem that you want to be processed for backup must be included in a domain statement in the dsm.opt file.


"ALL-LOCAL" specifies all local disks or filesystems will be backed up, but not network drives. In Windows, system objects and the system state are also included. If no domain statement is given ALL-LOCAL is used as a default.

You can specify only certain filesystems/drives or exclude certain ones. In this example only the F: and G: drives would be processed. Any other disks such as the C: drive and the Windows system state would not be backed up.

	DOMAIN 				F: G:

You can also exclude filesystems/drives using a "-". In this example all file systems are processed except /tmp.


Include/Exclude Statements

Once a filesystem is included in a domain statement in some fashion it will be processed for backup using any include and exclude statements. The order of the statements is very important. First, the TSM client processes all exclude.dir statements and removes those file spaces and directories from the list of objects for processing. Next, other include and exclude statements are processed from the bottom up.

TSM order of operations:

  1. Domain statements
  2. All exclude.dir statements
  3. Include and exclude statements from the bottom up

Here is an example where order is important. In the first example, file.txt is backed up.

exclude /home/user1/*
include /home/user1/file.txt

When the statements are reversed, file.txt is not backed up because it has already been excluded.

include /home/user1/file.txt
exclude /home/user1/*

If an exclude.dir statement is added it supersedes the include statement no matter where it is in the list, so in this example file.txt would not be backed up.

exclude.dir /home
exclude /home/user1/*
include /home/user1/file.txt

Include/Exclude Statement Options

Option Function
include Include file(s) or assign management classes for backup processing
exclude Exclude file(s) from backup processing

Exclude a directory, it's files, and all subdirectories from backup processing

You cannot use include options to override exclude.dir

exclude.fs Exclude a filesystem from backup processing
include.compression Include file(s) for compression

Exclude files from compression if compression is enabled

See Also: Compression in TSM


Include file(s) for encryption processing

Note: Encrypted backup data cannot be deduplicated

See Also: Encryption in TSM


Exclude files from encryption processing

This option is meant for the purposes of overriding include.encrypt statements

Pattern Matching

Please note that TSM pattern matching is very similar but not exactly the same as the pattern matching for your particular operating system.

Character Function Example
? Match any single character ab? matches abc or abd, not ab or abab

ab?de matches abcde or abbde, but not abxxde

ab??e matches abcde or abbbe, but not abe or abccee

* Match all characters ab* matches ab, abc, or abcd but not a or b

ab*de matches abde, abcde or abccccde

ab*d*f matches abdf, abcdf, abcdef or abccccdeeeeef

*.txt matches abc.txt and def.txt but not abdtxt

*:\data matches C:\data and E:\data

C:\data\* matches C:\data\file and C:\data\file.txt

C:\data\*.* matches C:\data\file.txt but not C:\data\file

/... or \... Match zero or more directories /home/.../tmp matches /home/user1/tmp, /home/user2/tmp and /home/tmp

C:\Users\...\tmp matches C:\Users\user1\tmp and C:\Users\user2\tmp and C:\Users\tmp

[ ] Match specific characters abc[abc] matches abca, abcb, or abcc but not abcd or abcaa
- Match a range of characters abc[a-c] matches abca, abcb, or abcc but not abcd or abcaa

abd[1-3] matches abc1, abc2, or abc3 but not abc4 or abc11

\ Literal escape character Removes the normal meaning of ?, *, [ or ] for character matching

a\?b matches a?b

a\]b matches a]b



exclude C:\...\*
include C:\Users\...\Documents\...\*