Excluding files with the EXCLUDE.DIR statement
The EXCLUDE.DIR statement excludes all directories and files under the parent directory.
If you want to include all files that match a file pattern, regardless of their location within a directory structure, do not use EXCLUDE.DIR statements.
For example, consider this set of include-exclude statements:
exclude.dir /usr
include /.../*.o
exclude.dir C:\Users
include C:\...\*.o
The INCLUDE statement in this example indicates that all files with a .o extension are included, but the preceding EXCLUDE.DIR statement excludes all files in the /usr or C:\Users directory, even if they have a .o extension. This fact would be true, regardless of the order of the two statements.
If you want to back up all the files that end with .o, use the following syntax:
exclude /usr/.../*
include /.../*.o
exclude C:\Users\...\*
include C:\...\*.o
When you use wildcards in include-exclude statements, use * if you want to include or exclude all the files, rather than the *.*.*.* pattern. The *.*.*.* pattern means to include or exclude all files that contain at least one dot (.) character, while * means to include or exclude all files. If you use *.*, files that contain no dot characters (such as C:\MYDIR\MYFILE on Windows) are not filtered.
If you want to run a selective backup, or a partial incremental backup, of a single file from the command-line client, it is not affected by the EXCLUDE.DIR option.
If you use the command-line client to start a selective backup, or a partial incremental backup, of a single file, the file is processed, even if there is an EXCLUDE.DIR statement that excludes one of the parent directories in the file path.
For example, consider the following include-exclude statement that is used in subsequent command-line actions:
exclude.dir /home/spike
exclude.dir C:\Users\spike
The following selective backup always results in the file being processed:
dsmc selective /home/spike/my.file
dsmc selective C:\Users\spike\my.file
If you issue a selective backup command that contains a wildcard, no files are processed because the directory is excluded:
dsmc selective "/home/spike/my.*"
dsmc selective "C:\Users\spike\my.*"
The following examples show incorrect EXCLUDE.DIR statements, due to a directory delimiter at the end of the directory path:
exclude.dir /usr/
exclude.dir /Users/
exclude.dir c:\directory\
The following examples show the correct coding of EXCLUDE.DIR:
exclude.dir /usr
exclude.dir /Users
exclude.dir c:\directory