Using the Backup-Archive Clients


Chapter 7. Creating an Include-Exclude File

TSM authorized user

You can create an include-exclude file to exclude a specific file or groups of files from backup and space management services (if the TSM HSM client is installed), and to assign specific management classes to files. TSM backs up any file that is not explicitly excluded. TSM client directories should be excluded from backup services.

To create an include-exclude file, you can use the TSM preference editor as follows:

  1. From the TSM GUI, select the Utilities menu> Preferences item.
  2. Select the Include/Exclude tab.

You can also create an include-exclude file by selecting the Utilities menu> Setup Wizard item from the TSM GUI.

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

  1. Determine your include and exclude requirements.
  2. Create a file with a name of your choice. The file can be located in any directory to which all users on your workstation have read access.
  3. Enter your include and exclude statements using the appropriate include-exclude options in Figure 8. Because TSM processes your include-exclude list from the bottom of the list up, it is important to enter all your include-exclude statements in the same section.
  4. Enter the name of your include-exclude options file in your client system options file using the inclexcl option. See Inclexcl for more information about the inclexcl option.

Figure 8 provides brief descriptions of the include and exclude options that you can specify in your include-exclude options file. See table references for more information about each option.

Figure 8. Include-Exclude Options

Option Description Page
exclude Excludes a file or group of files from backup services and space management services (if the TSM HSM client is installed). Any file in your client domain that is not specifically excluded with this option is considered for backup. Exclude Options
exclude.backup Excludes a file or a group of files from normal backup services, but not from HSM. Exclude Options
exclude.dir Locates matching directory names. If a matching directory is found, that directory, its files, and all its subdirectories and their files are excluded from backup services. Exclude Options
exclude.file Excludes files, but not directories, that match a pattern. Exclude Options
exclude.file.backup Excludes a file from normal backup services. Exclude Options
exclude.file.spacemgmt Excludes a file from hierarchical space management services (HSM) only. Use this option when you have both the backup-archive client and the HSM client installed. Exclude Options
exclude.fs Excludes file spaces matching a pattern. Exclude Options
exclude.image Excludes mounted file systems and raw logical volumes that match the pattern from image processing. This option is valid for AIX, HP-UX, and Solaris only. Exclude Options
exclude.spacemgmt Excludes a group of files from HSM backup only. Use this option when you have both the backup-archive client and the HSM client installed. Exclude Options
include Includes files or management classes for backup or archive processing. Include Options
include.file Includes a file for backup services, or assigns a management class to a file. Include Options
include.image Includes a file space or logical volume, or assigns a management class when used with the backup image command. The backup image command ignores all other include options. This option is valid for AIX, HP-UX, and Solaris cilents only. Include Options

Excluding System Files

For UNIX, we recommend that you have the following minimum include-exclude list in your include-exclude options file:

   exclude /unix/
   exclude.dir /unix/
   exclude /.../core

If you are using AFS, also specify:

   exclude /usr/vice/cache/*
   exclude /var/vice/cache/*

These are system files that cannot be recovered without possibly corrupting the operating system.


Including and Excluding Groups of Files

To specify groups of files that you want to include or exclude, use the wildcard characters listed in Figure 9. This table applies to include and exclude statements only. For information about using wildcard characters in TSM commands, see "Using Wildcard Characters in a Command".

Figure 9. 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. You cannot use the match-all character (or any wildcard character) when specifying the high-level qualifier of an object, only use it for the low-level qualifier. . 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. You cannot use the match-all character (or any wildcard character) when specifying the high-level qualifier of an object, only use it for the low-level qualifier. 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 file system specification), a match all directories is appended to the pattern. For example, these patterns are equivalent: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 file system specification), a match-all directories is appended to the pattern. For example, these patterns are equivalent:

   core
   /.../core

[ 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.
\ 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.
] The close character-class character ends the enumeration of a character class.

Examples Using Wildcards With Include and Exclude Patterns

Figure 10 contains examples of ways you might use wildcard characters with include and exclude patterns. For more information about using the exclude.backup and exclude.spacemgmt options, see Tivoli Storage Manager Installing the Clients, SH26-4102.

Note:The include and exclude commands do not work with symbolic links to directories. Do not use /u in these commands. For example, instead of entering:
   include /u/tmp/save.fil

enter:

   include /home/tmp/save.fil
The exclude command works with symbolic links to directories when you enter the backup command with the absolute path that contains the symbolic link.

Figure 10. Using Wildcard Characters with Include and Exclude Patterns

Task Pattern
Exclude all files with an extension of bak, except those found on the /usr file system in the dev directory.
exclude *.bak
include /usr/dev/*.bak     

Exclude all files and directories under any tmp directory that might exist, except for the file, /home/tmp/save.fil. Include this file.
exclude /.../tmp/.../*
include /home/tmp/save.fil

Match any .obj file in any directory on the /usr1, /usr2, and /usr3 file systems.
exclude /usr[1-3]/.../*.obj  

Match the .obj files found in the root directory in the usr2 file system only.
exclude /usr2/*.obj

Match any file that resides under the tmp directory found on any drive.
exclude /.../tmp/.../*

Exclude the entire directory structure /var/spool from all processing.
exclude.dir /var/spool

Exclude the raw logical volume from image backup.
exclude.image /dev/hd0/*/*


Processing Include and Exclude Options

The TSM 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.

    You can use the exclude.dir option in your options file to exclude directories and subdirectories from backup. See Exclude Options for more information.

  2. These options are checked from the bottom of the include-exclude list up, until a match is found. If 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.

The following examples demonstrate bottom up processing.

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

The file that processes is: /home/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 /home/foo/junk/*.obj does not match the file name that is being processed.

  2. Processing moves to Rule 2 and checks. This time, file /home/foo/.../*.obj matches the file name that is being processed. Processing stops, the option is checked, and it is include.

  3. File /home/foo/dev/test.obj is backed up.

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

The file that processes is: /home/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 /home/widg/copyit.bat is implicitly included and backed up.

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

The current file that processes is: /home/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 /home/lib/objs/printf.obj is not backed up.


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