Tivoli Storage Manager for Windows Using the Backup-Archive Client


Chapter 7. Creating an Include-Exclude List

You can create an include-exclude list to exclude a specific file or groups of files from backup services, and to assign specific management classes to files. Tivoli Storage Manager backs up any file that is not explicitly excluded. You should exclude Tivoli Storage Manager client directories from backup services.

Specify your include-exclude list in your client options file . This list can also contain include-exclude statements obtained from include-exclude files which you specify with the inclexcl option. The include-exclude statements are not case sensitive.

For Windows NT or 2000 clients: The include-exclude file can be in Unicode or non-Unicode format. If you specify a non-Unicode include-exclude file, the file must be in the same code page that the client is running.

When processing occurs, the include-exclude statements within the include-exclude file are placed at the position occupied by the inclexcl option in dsm.opt and processed accordingly.

See Inclexcl for detailed information about specifying an include-exclude file using the inclexcl option.

You can use one of the following methods to create an include-exclude list or specify an include-exclude file:

  1. From the client GUI, click Edit > Preferences > Include/Exclude tab.
  2. From the client GUI, click Utilities and then click Setup Wizard.
Note:
For Windows NT or 2000 clients: You can specify a Unicode file as an include-exclude file using the preferences editor. However, you cannot create the Unicode file using the preferences editor. See "Considerations for Windows NT, 2000 Unicode-Enabled Clients" for instructions on creating a Unicode include-exclude file.

You can also create an include-exclude list by performing the following steps:

  1. Determine your include and exclude requirements
  2. Locate the include-exclude section in your client options file
  3. Enter your include and exclude statements using the appropriate include-exclude options in Table 8, Table 10, and Table 9. Because Tivoli Storage Manager processes your include-exclude list from the bottom of the list up, it is important to enter all your include-exclude statements in the proper order.
  4. If you wish, you can specify an include-exclude file using the inclexcl option. The file can be located in any directory to which all users on your workstation have read access. See Inclexcl for more information about the inclexcl option.
  5. Save the file and close it. Save the file as dsm.opt or as the file specified in the DSM_CONFIG environment variable.
  6. Restart Tivoli Storage Manager with your new client options file.

Considerations for Windows NT, 2000 Unicode-Enabled Clients

For Windows NT and Windows 2000 Unicode-enabled clients, the include-exclude file can be in Unicode or non-Unicode format. If you specify a non-Unicode include-exclude file, that file must be in the same code page the client is running.

A Unicode include-exclude file provides the following benefits:

To create an include-exclude file in Unicode format, perform the following steps:

  1. Open Notepad.
  2. List your include and exclude statements using the appropriate include-exclude options in Table 8, Table 9, and Table 10. You may need to copy file names with characters from other code pages using Microsoft Windows Explorer.
  3. Click File and then click Save As. The Save As window displays.
  4. Select the Save as Unicode checkbox, specify the file and target directory, and save the file.
  5. Place an inclexcl option specifying the include-exclude file you just created in your client options file (dsm.opt).

Using Include-Exclude Options

This section provides the following:

Excluding Directories

Use exclude.dir statements to exclude directories from processing. Tivoli Storage Manager evaluates all exclude.dir statements first, and removes the excluded directories and files from the list of objects available for processing. The exclude.dir statements override all include statements that match the pattern.

Table 8. Option for Excluding Directories

Option Description Page
exclude.fs.nas Excludes file systems on the NAS filer from an image backup when used with the backup nas command. If you do not specify a NAS node name, the file system identified applies to all NAS filers. The backup nas command ignores all other exclude statements including exclude.dir statements. This option is for Windows NT and Windows 2000 clients only. Exclude Options
exclude.dir Excludes a directory, its files, and all its subdirectories and their files from backup services. The exclude.dir option works only if the excluded directory is a subdirectory. Use this option to exclude a portion of your data in which no underlying files need to be backed up.

When you exclude a directory, you can still back up specific files within that directory using a selective backup. However, the next time you perform an incremental backup, these backup versions are expired. If you exclude a directory that was previously included, Tivoli Storage Manager marks existing backup versions inactive during the next incremental backup.

Exclude Options

Controlling Backup, Archive, Image, and System Object Processing

After Tivoli Storage Manager evaluates all exclude.dir statements, the following options are evaluated against the remaining list of objects available for processing.

If you exclude an object that was previously included, Tivoli Storage Manager marks existing backup versions inactive during the next incremental backup.

Table 9. Options for Controlling Backup, Archive, and System Object Processing

Option Description Page
Backup Processing
exclude
exclude.backup
exclude.file
exclude.file.backup
These options are equivalent. Use these options to exclude a file or group of files from backup services. Exclude Options
include
include.backup
include.file
These options are equivalent. Use these options to include files or assign management classes for backup processing. Include Options
Archive Processing
exclude.archive Excludes a file or group of files from archive services. Exclude Options
include
include.archive
These options are equivalent. Use these options to include files or assign management classes for archive processing. Include Options
Image Processing
exclude.fs.nas Excludes file systems on the NAS filer from an image backup when used with the backup nas command. If you do not specify a NAS node name, the file system identified applies to all NAS filers. The backup nas command ignores all other exclude statements including exclude.dir statements. This option is for Windows NT and Windows 2000 clients only. Exclude Options
include.fs.nas Assigns a management class when used with the backup nas command. If you do not specify a NAS node name, the file system identified applies to all NAS filers. The backup nas command ignores all other include statements. This option is for Windows NT and Windows 2000 clients only. Include Options
System Object Processing
include.systemobject Assigns management classes for backup of Windows 2000 system objects. By default, Tivoli Storage Manager binds all system objects to the default management class. You cannot use this option to bind individual systemobject components to a different management class. You cannot use this option to include or exclude a system object from processing. This option is valid for Windows 2000 only.
Note:
Other include-exclude statements do not affect system object processing. It is unnecessary to explicitly include the registry staging directory include c:\adsm.sys\...\* for back up, to ensure that the registry is backed up properly. If you accidently exclude a directory that is critical to a system object backup, the system object backup is not affected.
Include Options

Controlling Compression, Encryption, and Subfile Processing

After Tivoli Storage Manager evaluates exclude.dir and all other include-exclude statements, the following options are evaluated against the remaining list of objects available for processing.

Table 10. Options for Controlling Compression, Encryption, and Subfile Processing

Option Description Page
Compression Processing
exclude.compression Excludes files from compression processing if compression=yes is specified. Exclude Options
include.compression Includes files for compression processing if compression=yes is specified. Include Options
Encryption Processing
exclude.encrypt Excludes files from encryption processing. Exclude Options
include.encrypt Includes files for encryption processing. Include Options
Adaptive Subfile Backup Processing
exclude.subfile Excludes files from adaptive subfile backup processing. This option is valid for all Windows clients. Exclude Options
include.subfile Includes files for adaptive subfile backup processing. This option is valid for all Windows clients. Include Options

Excluding System Files

We recommend that you have the following minimum include-exclude list in your client options file:

   exclude "*:\microsoft uam volume\*"
   exclude "*:\microsoft uam volume\...\*"
   exclude "*:\...\ea data. sf"
   exclude "*:\...\pagefile.sys"
   exclude "*:\...\ibmbio.com"
   exclude "*:\ibmdos.com"
   exclude "*:\msdos.sys"
   exclude "*:io.sys"
   exclude.dir *:\recycled
   exclude.dir *:\recycler
   exclude.dir *:\...\system32\wins
   exclude.dir *:\...\system32\LServer
   exclude.dir *:\...\system32\dhcp
   exclude.dir *:\...\system32\config
   exclude.dir "*:\system volume information"
   exclude *:\...\system32\perflib*.dat
   exclude.dir "*:\...\temporary internet files"
   exclude "*:\documents and settings\...\ntuser.dat.LOG"
   exclude "*:\documents and settings\...\ntuser.dat"
   exclude "*:\documents and settings\...\usrclass.dat.LOG"
   exclude "*:\documents and settings\...\usrclass.dat"

These are system files that cannot be recovered without possibly corrupting the operating system. If subfile backup is being used, the directory containing cache files should be excluded with exclude.dir. If you are using a disk compression program, you might want to exclude the dblspace.* and drvspace.* files. It is not necessary to back up these hidden files because Tivoli Storage Manager backs them up in the file spaces used by these programs. If you do back up these large files, your communication session might time out before Tivoli Storage Manager finishes sending the files. Consult your disk compression documentation for the file names or enter the following command to look for hidden files:

   dir \ /s /a:h

Excluding Files with UNC Names

You can exclude remotely accessed files by specifying their universal naming convention (UNC) names in your exclude statement. For example, assume that local drive letter g is mapped to the remote share point

\\remote\books

You would like to exclude from backups all files at the root of this share point that have an extension of .txt. You could use either of the following commands:

exclude g:*.txt
exclude \\remote\books\*.txt

You cannot specify UNC names for removable drives such as CD, ZIP, or diskette. For example, the following command is not valid:

exclude \\ocean\a$\winnt\system32\...\*

Including and Excluding Groups of Files

To specify groups of files that you want to include or exclude, use the wildcard characters listed in Table 11. This table applies to include and exclude statements only. For information about using wildcard characters in Tivoli Storage Manager commands, see "Using Wildcard Characters".

Table 11. Wildcard and Other Special Characters

Character Function
? The match-one character matches any single character except the directory separator; it does not match the end of the string. For example:
  • The pattern ab?, matches abc, but does not match ab, abab, or abzzz.
  • The pattern ab?rs, matches abfrs, but does not match abrs, or abllrs.
  • The pattern ab?ef?rs, matches abdefjrs, but does not match abefrs, abdefrs, or abefjrs.
  • The pattern ab??rs, matches abcdrs, abzzrs, but does not match abrs, abjrs, or abkkkrs.
* The match-all character. For example:
  • The pattern ab*, matches ab, abb, abxxx, but does not match a, b, aa, bb.
  • The pattern ab*rs, matches abrs, abtrs, abrsrs, but does not match ars, or aabrs, abrss.
  • The pattern ab*ef*rs, matches abefrs, abefghrs, but does not match abefr, abers.
  • The pattern abcd.*, matches abcd.c, abcd.txt, but does not match abcd, abcdc, or abcdtxt.
\... The match-n character matches zero or more directories.
\

The directory separator character limits the scope of the search for the matching n characters and directories. If a pattern does not begin with a directory separator (or one does not follow the drive specification), a match-all directories is appended to the pattern. For example, these patterns are equivalent:

   c:*
   c:\...\*
[ The open character-class character begins the enumeration of a character class. For example:
   xxx[abc] matches xxxa, xxxb, or xxxc.
- The character-class range includes characters from the first character to the last character specified. For example:
   xxx[a-z] matches xxxa, xxxb, xxxc, ... xxxz.

This format should not be used to specify remote drives in an exclude statement.

\ The literal escape character. When used within a character class, it treats the next character literally. When used outside of a character class, it is not treated in this way. For example, if you wish to include the ']' in a character class, enter [...\]...]. The escape character removes the usual meaning of ']' as the close character-class character.
] The close character-class character ends the enumeration of a character class.
: The drive separator character separates a file specification. The characters before the colon identify a drive name. The characters after the colon identify either a directory name or a file name. For example:
d:\direct\file.nam

Examples Using Wildcards with Include and Exclude Patterns

Table 12 contains examples of ways you might use wildcard characters with include and exclude patterns.

You cannot use wildcard characters with the include.fs.nas and exclude.fs.nas options.

Table 12. Using Wildcard Characters with Include and Exclude Patterns

Task Pattern
Exclude all files during backup with an extension of bak, except those found on the d: drive in the dev directory.
exclude ?:*.bak
include d:\dev\*.bak
Exclude all files and directories in any tmp directory that might exist, except for the file d:\tmp\save.fil. Include this file.
exclude ?:\...\tmp\...\*
include d:\tmp\save.fil
Exclude any .obj file for backup in any directory on the c: e: f: and g: drives.
exclude [ce-g]:\...\*.obj  

The c: e: f: and g: drives are local or removable.

Exclude the .obj files found in the root directory in the d: drive only.
exclude d:\*.obj
Exclude any file that resides under the tmp directory found in any file space on any drive.
exclude ?:tmp\...\*
Exclude the c:\mydir\test1 directory.
exclude.dir c:\mydir\test1
Exclude all directories under the \mydir directory with names beginning with test.
exclude.dir c:\mydir\test*
Exclude all directories directly under the \mydir directory with names beginning with test, on any drive.
exclude.dir ?:\mydir\test*
Exclude all directories and files on the local drives, except the c: drive.
exclude.dir ?:\...\*
exclude     [abd-z]:\...\*
exclude.dir [abd-z]:\...\*

Processing Include and Exclude Options

Include-exclude options can be defined on the server using the inclexcl parameter. The include-exclude statements specified by the server are evaluated along with those in the client options file. The server include-exclude statements are always enforced and placed at the bottom of the include-exclude list and evaluated before the client include-exclude statements.

If the client options file include-exclude list contains one or more inclexcl options that specify include-exclude files, the include-exclude statements in these files are placed in the list position occupied by the inclexcl option and processed accordingly.

Tivoli Storage Manager evaluates all exclude.dir statements first, and removes the excluded directories and files from the list of objects available for processing. See "Excluding Directories" and Exclude Options for more information about the exclude.dir option.

After evaluating all exclude.dir statements, Tivoli Storage Manager evaluates the include-exclude list from the bottom up and stops when it finds an include or exclude statement that matches the file it is processing. The order in which the include and exclude options are entered therefore affects which files are included and excluded. See Chapter 8, "Setting Common Options" for more information about the order in which all options are processed.

To display a list of all include-exclude statements in effect on your client workstation in the actual order they are processed, use the query inclexcl command. See Query Inclexcl for more information.

The client program processes the include and exclude options as follows:

  1. Files are checked; directories are only checked if the exclude.dir option is specified.
  2. File names are compared to the include-exclude list from the bottom up. When a match is found, the processing stops and checks whether the option is include or exclude. If the option is include, the file is backed up. If the option is exclude, the file is not backed up.
  3. If a match is not found, files listed are implicitly included and backed up.
  4. If policy administration is in effect, files are backed up according to the default management class, or the management class you specify on a matching include option.

The following examples demonstrate bottom up processing.

Example 1
Assume that c: is defined as the domain, and you defined the following statements for the include and exclude options:
   exclude ?:\*.obj
   include c:\foo\...\*.obj
   exclude c:\foo\junk\*.obj

The file being processed is: c:\foo\dev\test.obj. Processing follows these steps:

  1. Rule 3 (the last include or exclude statement defined) is checked first because of bottom up processing. The file c:\foo\junk\*.obj does not match the file name that is being processed.
  2. Processing moves to Rule 2 and checks. This time, file c:\foo\...\*.obj matches the file name that is being processed. Processing stops, the option is checked, and it is include.
  3. File c:\foo\dev\test.obj is backed up.

Example 2
Assume that c: is defined as the domain, and you defined the following statements for the include and exclude options:
   exclude ?:\*.obj
   include c:\foo\...\*.obj
   exclude c:\foo\junk\*.obj

The file being processed is: c:\widg\copyit.bat. Processing follows these steps:

  1. Rule 3 is checked and finds no match.
  2. Rule 2 is checked and finds no match.
  3. Rule 1 is checked and finds no match.
  4. Because a match is not found, file c:\widg\copyit.bat is implicitly included and backed up.

Example 3
Assume that c: is defined as the domain, and that you defined the following statements for the include and exclude options:
   exclude ?:\...\*.obj
   include c:\foo\...\*.obj
   exclude c:\foo\junk\*.obj

The current file being processed is: c:\lib\objs\printf.obj. Processing follows these steps:

  1. Rule 3 is checked and finds no match.
  2. Rule 2 is checked and finds no match.
  3. Rule 1 is checked and a match is found.
  4. Processing stops, the option is checked, and it is exclude.
  5. File c:\lib\objs\printf.obj is not backed up.

Processing Rules when Using UNC Names

When processing files with UNC names, Tivoli Storage Manager uses the rules described above. In addition, the following rules apply.

Explicit Use of UNC names for Remote Drives

Tivoli Storage Manager will recognize explicit use of UNC names for remote drives. For example, in the list below the UNC name pattern can be substituted for the DOS pattern. Assume local drive letter r: is mapped to remote share point \\remote\c$, s: is mapped to \\remote\share4, and t: is mapped to \\remote\share2.

Table 13. Using UNC Names with Include and Exclude Patterns

UNC Name Pattern DOS Pattern
\\remote\c$\include\file.out 
r:\include\file.out
\\remote\c$\...\file.out 
r:\...\file.out
\\remote\share4\exclude\*
s:\exclude\*  
\\remote\share2\...\?.out 
t:\...\?.out

Conversion of DOS Pathnames for Fixed and Remote Drives

Tivoli Storage Manager converts DOS pathnames that are mapped to remote share points. For example, a remote share point that is mapped from

r:\test\...\exclude.out

to

\\remote\share\test\...\exclude.out

is converted. Remote share points that are not mapped are not converted. Files on removable media are not converted.

File Space Name Matching

File space names that are specified with a wildcard must be UNC names. For example, the specification ?:\...\test.txt only matches files named test.txt which are specified in one or more of the following ways:

\\server\d$\test.txt
\\server\share\directory\test.txt
a:\diskette\test.txt

Character Class Matching

The following examples show valid matches using character class:

\\remote[a-z]\share\file.txt
matches    \\remotea\share\file.txt
 \\remote\share[a-z]\file.txt
matches     \\remote\sharex\file.txt
 \\remote\share\file[a-z].txt
matches     \\remote\share\fileg.txt 


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]