Exclude file spaces and directories

Use exclude.dir statements to exclude all files and subdirectories in the specified directory from processing.

The backup-archive client evaluates all exclude.dir statements first (regardless of their position within the include-exclude list), and removes the excluded directories and files from the list of objects available for processing. The exclude.dir statements override all include statements that match the pattern.

Table 1 lists the options you can use to exclude file spaces and directories from processing.

Table 1. Options for excluding file spaces and directories
Option Description
AIX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsexclude.fs Exclude options AIX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsExcludes 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.
Mac OS X operating systemsAIX operating systemsLinux operating systemsOracle Solaris operating systemsexclude.dir Exclude options Mac OS X operating systemsAIX operating systemsLinux operating systemsOracle Solaris operating systemsExcludes a directory, its files, and all its subdirectories and their files from backup processing. For example, the statement exclude.dir /test/dan/data1 excludes the /test/dan/data1 directory, its files, and all its subdirectories and their files. Using the exclude.dir option is preferable over the standard exclude option to exclude large directories containing many files that you do not want to back up. You cannot use include options to override an exclude.dir statement. Only use exclude.dir when excluding an entire directory branch.
  • Use the following statements to exclude volumes /Volumes/disk2 altogether from backup processing. Note that the volume (/Volumes/disk2) is backed up, but all other directories on /Volumes/disk2 is excluded.
     exclude /Volumes/disk2/*
     exclude.dir /Volumes/disk2/*
  • An alternative method for excluding an entire volume from domain incremental backup is to use a domain statement to exclude the volume. For example:
    domain "-/Volumes/disk2"

    This alternative still permits selective backup processing of files on /Volumes/disk2.

Windows operating systemsexclude.dir Exclude options Windows operating systemsExcludes a directory, its files, and all its subdirectories and their files from backup processing. For example, the statement exclude.dir c:\test\dan\data1 excludes the c:\test\dan\data1 directory, its files, and all its subdirectories and their files. Using the exclude.dir option is preferable over the standard exclude option to exclude large directories containing many files that you do not want to back up. You cannot use include options to override an exclude.dir statement. Only use exclude.dir when excluding an entire directory branch.

If you define an exclude statement without using a drive letter, such as exclude.dir dirname, this excludes from processing any directory named dirname on any drive.

  • The following examples illustrate valid exclude.dir statements:
    Exclude directory C:\MyPrograms\Traverse and its files and subdirectories:
    exclude.dir c:\MyPrograms\Traverse
    Exclude all directories below c:\MyPrograms\Traverse. Note that directory C:\MyPrograms\Traverse and the files immediately below C:\MyPrograms\Traverse is eligible for backup.
    exclude.dir c:\MyPrograms\Traverse\*
    Exclude all directories whose names begin with temp, and are located within directory x:\documents and settings and its subdirectories, where x: is any drive.
    exclude.dir "*:\documents and settings\...\temp*"
    Exclude all directories whose names begin with temp, regardless of the drive or directory in which they reside:
    exclude.dir temp*
    The following example is invalid because it ends with a directory delimiter:
    exclude.dir c:\MyPrograms\Traverse\
  • Use the following statements to exclude drive x: altogether from backup processing. Note that the drive root (x:\) is backed up, but all other files and directories on x: is excluded.
    exclude x:\*    
    exclude.dir x:\*
  • An alternative method for excluding an entire drive from domain incremental backup is to use a domain statement to exclude the drive. For example:
    domain -x: 
    This alternative still permits selective and explicit incremental backup processing of files on x:. For example:
    dsmc s x:\ -subdir=yes
    dsmc i x:
    dsmc i x:\MyPrograms\ -subdir=yes