Tivoli Header

Tivoli Storage Manager for UNIX Backup-Archive Clients Installation and User's Guide

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 all files and sub-directories in the specified directory 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 6. 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. 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 processing. For example, exclude.dir /test/dan/data1 excludes /test/dan/data1, its files, and all its subdirectories and their files.

However, you can still back up /test/dan/data1, its files, and all its subdirectories and their files using a selective backup, as follows:

  dsmc sel -subdir=yes /test/dan/data1/

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 of the files and directories beneath it inactive during the next incremental backup. Use this option to exclude a portion of your data in which no underlying files need to be backed up. The Tivoli Storage Manager Client API does not support this option.

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 7. 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, Solaris, and Linux86. 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, assigns a management class, or allows you to assign one of several image backup processing options to a specific logical volume 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, Solaris, and Linux86 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 any other include-exclude options controlling backup, archive, image, and system objects, it uses the following options to determine which files undergo compression, encryption, or subfile processing.

Table 8. Options for Controlling Compression and Encryption Processing

Option Description Page
Compression Processing
exclude.compression Excludes files from compression processing if compression=yes is specified. This option applies to backups and archives. Exclude Options
include.compression Includes files for compression processing if compression=yes is specified. This option applies to backups and archives. 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 9. 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 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. 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 10 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 10. 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 .o file in any directory on the /usr1, /usr2, and /usr3 file systems.
exclude /usr[1-3]/.../*.o  
Exclude the .o files found in the root directory in the usr2 file system only.
exclude /usr2/*.o
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 all file systems mounted anywhere in the /test/myfs/fs01 and /test/myfs/fs02 directory tree from backup processing.
exclude.fs /test/myfs/.../*
exclude.fs /test/myfs/*
Exclude the /home/mydir/test1 directory and any files and subdirectories under it.
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. (You must use the */* suffix to include or exclude logical volumes).
exclude.image /dev/hd0/*/* 


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