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. Specify your include-exclude list in your client options file dsm.opt on windows and dsm.sys file in UNIX. The include-exclude list can also go into a separate file, which is referred to by the inclexcl option. The include-exclude statements are not case-sensitive, if the file is not excluded, it is included.
If you do not create an include-exclude list, Tivoli Storage Manager considers all files for backup services and uses the default management class for backup and archive services. This is an optional task but useful in many scenarios.
Also Read: Why is it important to use DIRMC option during backups ?
Also Read: Why is it important to use DIRMC option during backups ?
- The list is read from the bottom to the top
- Processing stops when a match is found
- By default, objects that are not excluded are included.
How include-exclude process works ?
The include-exclude process is a bottom-up process. The last include-exclude statement is checked first. When the file matches the statement, exclude processing ends for that file. The include-exclude list is generated in the configuration options file. The exclude list in the options file are overridden by the include-exclude options on the command line.
Image Source: IBM
Excluding directories from backup
The EXCLUDE.DIR statement excludes a directory structure from backup and from being traversed during incremental backup. The EXCLUDE.DIR statements are read first, regardless of their position within the include-exclude list, and the excluded directories are removed from the list of objects that are available to process.
You can abbreviate the EXCLUDE.FILE statement to EXCLUDE. The statement excludes files from backup. A directory is traversed even if all the files from that directory are excluded. If a directory structure is excluded by using EXCLUDE.DIR, subdirectories in the excluded directory tree are not eligible for backup. Any INCLUDE statement that includes part of an excluded directory structure is bypassed at backup time.
Also Read: Use these Exclude options during backup to save storage pool space
Also Read: Use these Exclude options during backup to save storage pool space
The Tivoli Storage Manager backup-archive client builds an internal traverse tree before performing a backup. The EXCLUDE.DIR statement excludes a directory structure from the traverse tree. It prevents directories and directory attributes from being backed up.
Although a directory structure is excluded by using the EXCLUDE.DIR statement, subdirectories and files within the excluded directory structure can be explicitly backed up.
Consider the following example incl-excl list.
include /home/dir1/subdir2
exclude.dir /home/dir1
include /home/dir1/subdir1
In the above example, the include statement for the /home/dir1/subdir1 and /home/dir1/subdir2 directories is bypassed when an incremental backup is done because the subdirectory is excluded by use of an EXCLUDE.DIR statement.
dsmc> selective -subdir=yes /home/*
dsmc> selective /home/dir1/subdir1/*
Enabling client compression and encryption by include-exclude statements
CLIENT COMPRESSION: The compression option compresses files before you send them to the server.
CLIENT ENCRYPTION: You can encrypt the data that goes to the server during a backup or archive operation by using standard encryption.
Also Read: 3 TDPO utilities to troubleshoot Oracle DB issues
Also Read: 3 TDPO utilities to troubleshoot Oracle DB issues
- Compression
- Encryption
Tivoli Storage Manager processes EXCLUDE.DIR and other include-exclude statements first. Afterward, Tivoli Storage Manager processes the following statements
- include.compression
- include.encrypt
For example, consider the following include-exclude list
exclude c:\lab\file.txt
include.compression c:\lab\file.txt
include.encrypt c:\lab\file.txt
Tivoli Storage Manager examines the exclude c:\lab\file.txt statement first, determines that c:\lab\file.txt is excluded from backup processing and that the file is not a candidate for compression or encryption processing.
Binding Files or Directories to another management class using include-exclude list
In the include-exclude list, you can establish files that are included in or excluded from backup processing. The include statement serves two purposes. One purpose is to specify exceptions to the exclude list. The other purpose is to associate a management class with a file or group of files. The include statement is also used during archiving to determine the management class. The exclude statement is not checked during the archive processing.
Unless you have the EXCLUDE.DIR statement, directory objects are always included in the backup, even when all the files within the directory are excluded. You can assign a management class for a file or file group by using an INCLUDE statement in your client options file. For example, to associate all of the files in the sales directory with a management class named project, enter the following text
include c:\tsm\project\sales\* project
Wild cards and special characters
The include-exclude list uses metacharacters to select files to include or exclude. Some metacharacters differ, depending on the client platform. These metacharacters are to specify wildcard processing. You can use the metacharacters or wild cards in the command line to specify the file specification on most commands.
Also Read: Understanding Management Class Binding and Management Class Rebinding
Also Read: Understanding Management Class Binding and Management Class Rebinding
? The match one character finds any single character except the directory separator; it does not find the end of the string.
* The match-all character.
\...\ Windows: The match-n character matches zero or more directories.
/.../ UNIX: The match-n character matches zero or more directories.
- The character-class range includes characters from the first character to the last one specified.
[ ] The open and close character-class characters allow the enumeration of a character class.
0 Comment to "8.4 Configuring INCLUDE and EXCLUDE for managing backup and archive"
Post a Comment