Tivoli Storage Manager for UNIX Using the Backup-Archive Clients


Creating an Include-Exclude List

Authorized User

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 the include-exclude list in your client system options file (dsm.sys). If you have more than one server defined in your dsm.sys file, each server must have its own include-exclude list. This list can also contain include-exclude statements obtained from the include-exclude files you specify with the inclexcl option.

Note:
For the AIX DFS client: Specify an include-exclude file with the dfsinclexcl option and then specify the include-exclude list in that file only. See Dfsinclexcl for more information.

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 Utilities > Preferences > Include/Exclude catagory.
  2. From the client GUI, click Utilities and then click Setup Wizard.

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

  1. Determine your include and exclude requirements
  2. Locate the server stanza in your client system options file (dsm.sys)

    Note: Each server stanza must have its own include-exclude list.

  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.
  6. Restart Tivoli Storage Manager with your new client system options file (dsm.sys).

Using Include-Exclude Options

This section provides the following:

Excluding File Spaces and Directories

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

Table 8. Options for Excluding File Spaces and Directories

Option Description Page
exclude.fs Excludes file spaces matching the pattern. The client does not consider the specified file space for processing and the usual deleted-file expiration process cannot occur. If you exclude a file space that was previously included, existing backup versions remain on the server subject to retention rules specified in the associated management class definition. See Exclude Options for more information. This option is valid for UNIX clients only. Exclude Options
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.fs and exclude.dir statements. This option is for AIX, AIX 5L, and Solaris 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, and Image Processing

After Tivoli Storage Manager evaluates all exclude.fs and 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 Image 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 and space management services (if the HSM client is installed). The exclude.backup option only excludes files from normal backup, but not from HSM. 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.image Excludes mounted file systems and raw logical volumes that match the pattern from image processing. This option is valid for AIX, AIX 5L, HP-UX, and Solaris only. Exclude Options
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.fs and exclude.dir statements. This option is for AIX, AIX 5L, and Solaris clients only. Exclude 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, AIX 5L, HP-UX, and Solaris clients only. Include 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 AIX, AIX 5L, and Solaris clients only. Include Options

Controlling Compression and Encryption Processing

After Tivoli Storage Manager evaluates exclude.fs, 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 and Encryption 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

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

Examples Using Wildcards with Include and Exclude Patterns

Table 12 contains examples of ways you might use wildcard characters with include and exclude patterns. For more information about using the exclude.backup option, see Exclude Options.

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.

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 /usr file system in the dev directory.
exclude *.bak
include /usr/dev/*.bak     
Exclude all files and directories in any tmp directory that might exist, except for the file /home/tmp/save.fil. Include this file.
exclude /.../tmp/.../*
include /home/tmp/save.fil
Exclude any .obj file in any directory on the /usr1, /usr2, and /usr3 file systems.
exclude /usr[1-3]/.../*.obj  
Exclude the .obj files found in the root directory in the usr2 file system only.
exclude /usr2/*.obj
Exclude any file that resides under the tmp directory found in any file space .
exclude /.../tmp/.../*
Exclude the entire directory structure /var/spool from all processing.
exclude.dir /var/spool
Exclude the /test/myfs/fs01 and /test/myfs/fs02 file systems from backup processing.
exclude.fs /test/myfs/.../*
exclude.fs /test/myfs/*
Exclude the /home/mydir/test1 directory.
exclude.dir /home/mydir/test1
Exclude all directories under the /home/mydir directory with names beginning with test.
exclude.dir /home/mydir/test*
Exclude all directories directly under the /mydir directory with names beginning with test, on any file system.
exclude.dir /.../mydir/test*
Exclude the raw logical volume from image backup.
exclude.image /dev/hd0/*/*

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 user options file (dsm.opt). 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 system options file (dsm.sys) 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.fs and exclude.dir statements first, and removes the excluded file spaces, directories, and files from the list of objects available for processing. See "Excluding File Spaces and Directories" and Exclude Options for more information about the exclude.fs and exclude.dir options.

After evaluating all exclude.fs and 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 "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 /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 being processed 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 being processed 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 that 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 being processed 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 ]