Subdir

The subdir option specifies whether you want to include subdirectories of named directories for processing.

You can use the subdir option with the following commands:

  • archive
  • delete archive
  • delete backup
  • AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systemsincremental
  • query archive
  • query backup
  • restore
  • restore backupset
  • restore group
  • retrieve
  • selective
If you set the subdir option to yes when backing up a specific path and file, Tivoli® Storage Manager recursively searches all of the subdirectories under that path, and looks for any instances of the specified file that exist under any of those subdirectories. For example, assume that a file called myfile.txt exists on a client in the following directories:
//myfile.txt
/dir1/myfile.txt
/dir1/dir_a/myfile.txt
/dir1/dir_b/myfile.txt
Performing a selective backup of that file, as follows, backs up all four instances of myfile.txt:
dsmc sel /myfile.txt -subdir=yes
Similarly, the following command displays all instances of myfile.txt if you specify subdir=yes in the client options file or in a client options set.
dsmc restore /myfile.txt -pick
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systems

Supported Clients

This option is valid for all clients. The server can also define this option. The Tivoli Storage Manager client API does not support this option.

Options File

Windows operating systemsPlace this option in the client options file (dsm.opt).

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsPlace this option in the client user-options file (dsm.opt).

Syntax

Read syntax diagramSkip visual syntax diagram
           .-No--.   
>>-SUbdir--+-----+---------------------------------------------><
           '-Yes-'   

Parameters

No
Subdirectories are not processed. This is the default.
Yes
Subdirectories are processed. Because the client program searches all subdirectories of a directory that is being processed, processing can take longer to complete. Specify Yes only when necessary.

If you use the preservepath option in addition to subdir=yes, it can affect which subdirectories are processed.

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsIf a subdirectory is a mounted file system, it is not processed even if you specify subdir=yes.

Note:
  1. When you run the client in interactive mode, and if you use the -subdir=yes option, the setting persists for all commands entered in interactive mode, until you end interactive mode, by typing Quit.
  2. If subdir=yes is in effect when you restore multiple files, place a directory delimeter character at the end of the destination file specification. If the delimeter is omitted, the client displays a message indicating that the destination file specification is not valid.
  3. It is a best practice to include only the default value for subdir (No) in a client options file or a client options set.

Examples

Options file:
subdir no
Command line:
Mac OS X operating systems To restore the structure:
/Users/mike/dir1
/Users/mike/dir1/file1
/Users/mike/dir1/dir2
/Users/mike/dir1/dir2/file1
enter any of the following commands:
dsmc rest "/Users/van/dir1/*" /Users/mike/ -su=yes
dsmc rest "/Users/van/dir1/file*" /Users/mike/ -su=yes
dsmc rest "/Users/van/dir1/file1*" /Users/mike/ -su=yes 
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systems To restore the structure:
/path2/dir1
/path2/dir1/file1
/path2/dir1/dir2
/path2/dir1/dir2/file1
enter any of the following commands:
dsmc rest "/path/dir1/*" /path2/ -su=yes
dsmc rest "/path/dir1/file*" /path2/ -su=yes
dsmc rest "/path/dir1/file1*" /path2/ -su=yes 
Windows operating systems To restore the structure:
\path2\dir1
\path2\dir1\file1
\path2\dir1\dir2
\path2\dir1\dir2\file1
enter any of the following commands:
rest \path\dir1\* \path2\ -su=yes
rest \path\dir1\file* \path2\ -su=yes
rest \path\dir1\file1* \path2\ -su=yes

This option is valid on the initial command line and in interactive mode. If you use this option in interactive mode, it affects only the command with which it is specified. When that command completes, the value reverts to the value at the beginning of the interactive session. This is the value from the dsm.opt file unless overridden by the initial command line or by an option forced by the server.