Selective
The selective command backs up files that you specify. If you damage or mislay these files, you can replace them with backup versions from the server.
When you run a selective backup, all the files are candidates for backup unless you exclude them from backup, or they do not meet management class requirements for serialization.
During a selective backup, copies of the files are sent to the server even if they did not change since the last backup - which can result in more than one copy of the same file on the server. If this occurs, you might not have as many different down-level versions of the file on the server as you intended. Your version limit might consist of identical files. To avoid this, use the incremental command to back up only new and changed files.




You can selectively
back up single files or directories. You can also use wildcard characters
to back up groups of related files.
If you set the subdir option to yes when you back up a specific path and file, the client recursively backs up all subdirectories under that path, and any instances of the specified file that exist under any of those subdirectories.
During a selective backup, a directory path might be backed up,
even if the specific file that was targeted for backup is not found.
For example, the following command still backs up dir1 and dir2 even if the file bogus.txt does not exist.

selective /Users/user1/Documents/dir1/bogus.txt 



selective "/dir1/dir2/bogus.txt" 
selective c:\dir1\dir2\bogus.txt If the selective command is retried because of a communication failure or session loss, the transfer statistics displays the number of bytes that the client attempts to transfer during all command attempts. Therefore, the statistics for bytes transferred might not match the file statistics, such as those for file size.



You can use the removeoperandlimit
option to specify that the 20-operand limit is removed. If you specify the
removeoperandlimit option with the selective command, the
20-operand limit is not enforced and is restricted only by available resources or other operating
system limits.





Supported Clients
This command is valid for all clients.
Syntax
Parameters
- filespec
- Specifies the path and name of the file you want to back up. Use wildcard characters to include a group of files or to include all files in a directory.
| Option | Where to use |
|---|---|
changingretries |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() changingretries |
![]() ![]() ![]() Client system options
file (dsm.sys) or command line. |
compressalways |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() compressalways |
![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
compression |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() compression |
![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
| dirsonly | Command line only. |
| filelist | Command line only. |
| filesonly | Command line only. |
postsnapshotcmd |
Client options file
(dsm.opt) or with the include.fs option. |
![]() ![]() ![]() preservelastaccessdate |
![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
preservelastaccessdate |
Client options file
(dsm.opt) or command line. |
presnapshotcmd |
Client options file
(dsm.opt) or with the include.fs option. |
![]() ![]() ![]() removeoperandlimit |
![]() ![]() ![]() Command line only. |
skipntpermissions |
Client options file
(dsm.opt) or command line. |
skipntsecuritycrc |
Client options file
(dsm.opt) or command line. |
![]() snapshotcachesize |
![]() Client options file
(dsm.opt) or with the include.fs option. |
snapshotproviderfs |
System-options file
(dsm.sys) within a server stanza or with the include.fs option. |
snapshotproviderfs |
Client options file
(dsm.opt) or with the include.fs option. |
![]() ![]() ![]() ![]() snapshotroot |
![]() ![]() ![]() ![]() Command line only. |
subdir |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() subdir |
![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
tapeprompt |
Client options file
(dsm.opt) or command line. |
![]() ![]() ![]() tapeprompt |
![]() ![]() ![]() Client user options
file (dsm.opt) or command line. |
Examples



Task


Back up the projafile in the/home/develdirectory.Command:
selective /home/devel/proja
Task
Back up the proja.devfile in thec:\develdirectory.Command:
sel c:\devel\proja.dev


Task


Back up all files in the /home/develdirectory whose file names begin withproj.Command:
selective "/home/devel/proj*"
Task
Back up all files in the c:\develdirectory whose file names begin withproj.Command:
sel c:\devel\proj*.*


Task


Back up all files in the /home/develdirectory whose file names begin withproj. Back up the single file that is namedbudgetin the/user/homedirectory.Command:
selective "/home/devel/proj*" /user/home/budget
Task
Back up all files in the c:\develdirectory whose file names begin withproj. Back up all files with a file extension of.finin thec:\planningdirectory.Command:
sel c:\devel\proj* c:\planning\*.fin


Task


Back up the /homefile system.Command:
selective /home/ -subdir=yes


Task


Assuming that you initiated a snapshot of the /usrfile system and mounted the snapshot as/snapshot/day1, run a selective backup of the/usr/dir1/sub1directory tree from the local snapshot and manage it on the IBM® Storage Protect server under the file space name/usr.Command:
dsmc sel "/usr/dir1/sub1/*" -subdir=yes -snapshotroot=/snapshot/day1
Task
Assuming that you initiated a snapshot of the C:\drive and mounted the snapshot as\\florence\c$\snapshots\snapshot.0, run a selective backup of thec:\dir1\sub1directory tree from the local snapshot and manage it on the IBM Storage Protect server under the file space nameC:\.Command:
dsmc sel c:\dir1\sub1\* -subdir=yes -snapshotroot=\\florence\c$\snapshots\snapshot.0
