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, Tivoli® Storage Manager 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 Tivoli Storage Manager 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 Tivoli Storage Manager removes the 20-operand limit. 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
.-----------------. V | >>-Selective------ --filespec---+--+------------+-------------->< '- --options-'
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.
- To include multiple file specifications, separate each filespec
with a space character. If multiple file specifications are included,
and two or more of the specifications have common parent directories,
then it is possible for the common directory objects to be backed
up more than once. The conditions under which this behavior occurs
are runtime-dependent, but the behavior itself has no adverse effects.
For example, if the filespec is /home/amr/ice.doc /home/amr/fire.doc, then /home and /home/amr might be backed up twice. The file objects, ice.doc and fire.doc, are backed up only once.
For example if the filespec is C:\proposals\drafts\ice.doc C:\proposals\drafts\fire.doc, then C:\proposals and C:\proposals\drafts might be backed up twice. The file objects ice.doc and fire.doc are backed up only once.
- If you want to avoid including the shared parent directory more than once, use separate, non-overlapping selective commands to back up each file specification.
- If you back up a file system, include a trailing slash (/home/).
- There is a limit of 20 operands. This limit prevents excessive sessions that are caused when wildcards are expanded by the UNIX shell command processor. You can prevent shell expansion from causing you to go over the 20-operand limit by placing quotation marks around file specifications that contain wildcards ("home/docs/*").
- You can use the removeoperandlimit option to specify Tivoli Storage Manager removes
the 20-operand limit. If you specify the removeoperandlimit option, the 20-operand limit is not enforced and is restricted only
by available resources or other operating system limits. For example,
remove the 20 operand limit to backup 21 file specifications:
selective -removeoperandlimit filespec1 filespec2 ... filespec21
- If you back up a file system, include a trailing slash (C:\).
- You can specify as many file specifications as available resources or other operating system limits allow.
- You can use the filelist option, instead of file specifications, to identify which files to include in this operation. However, these two methods are mutually exclusive. You cannot include file specification parameters and use the filelist option. If the filelist option is specified, any file specifications that are included are ignored.
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 proja file in the /home/devel directory.
Command: selective /home/devel/proja
- Task
- Back up the proja.dev file in the c:\devel directory.
Command: sel c:\devel\proja.dev
- Task
- Back up all files in the /home/devel directory
whose file names begin with proj.
Command: selective "/home/devel/proj*"
- Task
- Back up all files in the c:\devel directory whose
file names begin with proj.
Command: sel c:\devel\proj*.*
- Task
- Back up all files in the /home/devel directory
whose file names begin with proj. Back up the single
file that is named budget in the /user/home directory.
Command: selective "/home/devel/proj*" /user/home/budget
- Task
- Back up all files in the c:\devel directory whose
file names begin with proj. Back up all files with
a file extension of .fin in the c:\planning directory.
Command: sel c:\devel\proj* c:\planning\*.fin
- Task
- Back up the /home file system.
Command: selective /home/ -subdir=yes
- Task
- Assuming that you initiated a snapshot of the /usr file system and mounted the snapshot as /snapshot/day1, run a selective backup of the /usr/dir1/sub1 directory
tree from the local snapshot and manage it on the Tivoli Storage Manager 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 the c:\dir1\sub1 directory
tree from the local snapshot and manage it on the Tivoli Storage Manager server
under the file space name C:\.
Command: dsmc sel c:\dir1\sub1\* -subdir=yes -snapshotroot=\\florence\c$\snapshots\snapshot.0