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
- incremental
- query archive
- query backup
- restore
- restore backupset
- restore group
- retrieve
- selective
//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
dsmc restore /myfile.txt -pick
Supported Clients
This option is valid for all clients. The server can also define this option. The IBM® Storage Protect API does not support this option.
Options File
Place this option in the client options file (dsm.opt).
Place this option in the client user-options file (dsm.opt).
Syntax
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.
If a subdirectory is a mounted file system, it is not processed even if you specify subdir=yes.
- 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.
- 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.
- 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:
- To restore the structure:
enter any of the following commands:/Users/mike/dir1 /Users/mike/dir1/file1 /Users/mike/dir1/dir2 /Users/mike/dir1/dir2/file1
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
To restore the structure:
enter any of the following commands:/path2/dir1 /path2/dir1/file1 /path2/dir1/dir2 /path2/dir1/dir2/file1
dsmc rest "/path/dir1/*" /path2/ -su=yes dsmc rest "/path/dir1/file*" /path2/ -su=yes dsmc rest "/path/dir1/file1*" /path2/ -su=yes
To restore the structure:
enter any of the following commands:\path2\dir1 \path2\dir1\file1 \path2\dir1\dir2 \path2\dir1\dir2\file1
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.