TSM provides a command line interface (CLI) that you can
use as an alternative to the graphical user interface (GUI). This
chapter describes how to start or end a client command session, and how to
enter commands. It also provides detailed information about each TSM
command. Figure 28 shows a list of tasks related to entering commands.
Command | Description | Page |
---|---|---|
archive | Archives files from a workstation to TSM storage. | Archive |
backup image | Creates an image backup of one or more file spaces. | Backup Image |
cancel restore | Displays a list of restartable restore sessions and permits you to select one to cancel. | Cancel Restore |
delete access | Revokes authorization for a user to restore or retrieve files. | Delete Access |
delete archive | Deletes archived files from TSM storage. | Delete Archive |
delete filespace | Deletes file spaces in TSM storage. | Delete Filespace |
help | Displays online command help. | Help |
incremental | Backs up new and changed files. | Incremental |
loop | Starts an interactive command session. | Loop |
macro | Uses commands within a macro file. | Macro |
query access | Displays a list of current authorization rules. | Query Access |
query archive | Displays a list of archived files. | Query Archive |
query backup | Displays a list of backup versions. | Query Backup |
query backupset | Queries a backup set from the server or a local file. A backup set can also be queried from a tape device. | Query Backupset |
query filespace | Displays a list of file spaces in TSM storage. | Query Filespace |
query image | Displays information regarding backed up images. | Query Image |
query mgmtclass | Displays information about available management classes. | Query Mgmtclass |
query restore | Displays a list of your restartable restore sessions in the server database. | Query Restore |
query schedule | Displays information about scheduled events. | Query Schedule |
query session | Displays information about the current session. | Query Session |
restart restore | Displays a list of restartable restore sessions and permits you to select one to restart. | Restart Restore |
restore | Restores backup versions from TSM storage. | Restore |
restore backupset | Restores a backup set from the server or a local file. A backup set can also be restored from a tape device. | Restore Backupset |
restore image | Restores a backed up image. | Restore Image |
retrieve | Retrieves archived files from TSM storage. | Retrieve |
schedule | Starts the client scheduler on the workstation. | Schedule |
selective | Backs up selected files. | Selective |
set access | Authorizes another user to access your backup versions or archive copies. | Set Access |
set password | Changes the TSM password for your workstation. | Set Password |
You can start or end a client command session in either batch mode or interactive mode. Use batch mode when you want to enter a single client command. TSM processes the command and returns to the shell command prompt.
Use interactive mode when you want to enter a series of commands. Since TSM establishes connection to the server only once for interactive mode, a series of commands can be processed more quickly. TSM processes the commands and returns to the tsm> prompt.
When you enter a single command in batch mode, precede it with the executable program name, dsmc. TSM processes the command and returns to the shell command prompt. For example, to process the incremental command in batch mode, you would enter:
dsmc incremental
If a password is required, TSM prompts you each time you enter a command if the passwordaccess option is set to prompt, or authentication on the server is set to On. Type your password and press Enter.
You can also enter your password using the password option with a command, but your password is displayed. For example, if your password is secret, enter:
dsmc incremental -password=secret
If you set the passwordaccess option to generate in your dsm.opt file, you are not required to specify the password with the command. TSM only prompts you for your password if you are registering your workstation with a server, or manually changing your password.
To end a batch mode session, enter quit at the prompt.
Use the interactive mode to enter a series of commands. Enter dsmc on the command line and press Enter. Do not precede each command with the executable program name, dsmc. When the tsm> command prompt displays, type the command name and press Enter. Alternatively, you can enter dsmc loop on the command line to start a client command session in interactive mode. Loop is the default command for dsmc.
If a password is required, TSM prompts you when you enter the first command. Type your userid and password and press Enter. You can also enter your password using the password option with the loop command, but your password is displayed. For example, if your password is secret, you would enter:
dsmc loop -password=secret
To end an interactive session, enter quit at the prompt.
A client command can include one or more of these components:
The sections that follow describe each of these components.
The first part of a command is the command name. The command name consists of a single word, such as help or schedule, or an action word and an object for that action, such as query archive. Enter the full command name, or its minimum abbreviation. For example, you can enter any of the following versions of the query schedule command:
query schedule q sc q sched query sc
There are two groups of options that you can use with commands:
Commands can have required parameters, optional parameters, or no parameters at all. Required parameters provide information to perform a task. The most commonly required parameter is a file specification. For example, if you want to archive a file named budget.fin from the /project directory, you would enter:
dsmc archive /project/budget.fin
Some commands have optional parameters. If you do not enter a value when you include an optional parameter, TSM uses the default value. For example, the restore command includes a required parameter, sourcefilespec, that specifies the path and file name in storage that you want to restore. The optional parameter, destinationfilespec, specifies the path and file name where you want to place the restored files. If you do not specify the destinationfilespec, by default, TSM restores the files to the original source path. If you want to restore the files to a different directory, enter a value for destinationfilespec. For example, to restore /project/budget.fin to /newproj/newbudg.fin, you would enter:
dsmc restore /project/budget.fin /newproj/newbudg.fin
Enter parameters in the order indicated in the command syntax diagram.
Use the following syntax rules when specifying file specification parameters, such as filespec, sourcefilespec, and destinationfilespec:
dsmc restore /fs/dir1/* mydir/
dsmc i /fsThe following example is not valid:
dsmc sel /fs
When specifying a file specification, if the name ends with /, then it is considered a directory, otherwise it is considered a file.
The following example illustrates these two rules. Even though mydir and yourdir are directories, the command will fail because /* is implied after mydir, and yourdir is considered a file:
restore /home/mydir/ /away/yourdir
The following example illustrates the second rule. Even though mydir and yourdir are directories, the command will fail because mydir and yourdir are considered files:
restore /home/mydir /away/yourdir
dsmc set access /fs/dir1/*/*
Do not use wildcards for the directory path name, for example:
/home/j*asler/file1.c
If the editor=yes option is specified in your options file, TSM permits you to recall and edit as many as 20 previously entered commands using the up arrow and down arrow keys. If the editor=no option is specified, the feature to recall previous commands is not active. If the editor and command retrieve functions are not working on a specific workstation setting, you should turn off the editor option. For more information regarding the editor option, see Editor.
Pressing the Up arrow key displays the previous command in memory.
Pressing the Down arrow key displays the next command in memory. Figure 30 lists other functions you can perform when you recall
commands.
Figure 30. Command Recall and Edit Functions
Function | Press |
Display the previous command in memory. | Up arrow |
Display the next command in memory. | Down arrow |
Move to the beginning of the command. | Home |
Move to the end of the command. | End |
Move to the left. | Left arrow |
Move to the right. | Right arrow |
Move five spaces to the left. | Tab left |
Move five spaces to the right. | Tab right |
Move to the beginning of the previous word | Ctrl-left arrow or CTRL-L |
Move to the beginning of the next word. | Ctrl-right arrow or CTRL-R |
Delete a character to the right of the cursor. | Delete |
Delete a character to the left of the cursor. | Backspace |
Insert a character. | Toggle the Insert key |
Erase to the end of the line. | Ctrl-delete or Ctrl-D |
Finish or execute the command. | Enter |
Quit the program. | F3 or Esc |
End the program. | CTRL-C |
In a command, wildcard characters can be used in the file name or file extension only. You cannot use them to specify destination files, file systems, or directories. You cannot specify a directory whose name contains an asterisk (*) or a question Mark (?). TSM recognizes these characters only as wildcard characters. Use wildcard characters when you want to specify multiple files with similar names in one command. Without wildcard characters, you must repeat the command for each file. Valid wildcard characters that you can use include:
Figure 31 shows examples of each wildcard.
Figure 31. Wildcard Characters
Pattern | Matches | Does Not Match |
---|---|---|
Asterisk (*) |
|
|
ab* | ab, abb, abxxx | a, b, aa, bb |
ab*rs | abrs, abtrs, abrsrs | ars, aabrs, abrss |
ab*ef*rs | abefrs, abefghrs | abefr, abers |
abcd.* | abcd.c, abcd.txt | abcd, abcdc, abcdtxt |
Question Mark (?) |
|
|
ab? | abc | ab, abab, abzzz |
ab?rs | abfrs | abrs, abllrs |
ab?ef?rs | abdefjrs | abefrs, abdefrs, abefjrs |
ab??rs | abcdrs, abzzrs | abrs, abjrs, abkkkrs |
Note: Values containing wildcards must be enclosed in double quotes if entered in batch mode. For example:
dsmc selective "/home/me/*.c"
Follow the general rules below when you enter commands:
The following sections contain detailed information about each of the TSM commands. These commands are arranged in alphabetical order. Information for each commands includes:
The archive command archives a single file, selected files, or all files in a directory and its subdirectories on a server. Directories are archived.
Archive files that you want to preserve in their current condition. To release storage space on your workstation, delete files as you archive them. Retrieve the archived files to your workstation whenever you need them again.
Syntax
.------------------. V | >>-ARchive---+-----------+-----+- filespec---+--+-------------->< '- options--' '- "filespec"-'
Parameters
You can use the changingretries and subdir common options with the archive command. See Chapter 8, "Setting Common Options" for information about these common options.
Examples
The following are examples of tasks you might perform using the archive command.
Command: archive /home/proj1/budget
Command: archive "/home/proj1/*.txt"
Command: archive -subdir=yes "/home/*"
Note: | This command is not valid for the following UNIX clients: Linux, SGI, Unixware, PTX, and Tru64. |
The backup image command creates an image backup of one or more file spaces that you specify. Use the include.image option to include an image for backup, or to assign a specific management class to an image object.
When using the backup image command, it is important to be aware of special considerations if you want to do either of the following:
To ensure that you can perform point-in-time restores of your file systems, including deleting original image files which no longer exist on the logical volume, use a combination of full image backups and the incremental command as described in the steps below:
dsmc incremental/myfilesystem
dsmc backup image/myfilesystem
dsmc incremental/myfilesystem
You must follow these steps in the order shown to ensure that additions and deletions are accurately recorded at the server. Then, the following command restores the file system to its exact state as of the last incremental backup: dsmc restore image /myfilesystem -incre -del
If the steps are not followed exactly, two things can occur:
Two types of backup apply to logical volumes: mode=selective (the default) and mode=incremental. Mode=selective causes a full backup copy of the logical volume to be created and sent to the server. Mode=incremental causes only those files which were added or changed since the most recent full image backup to be sent to the server. TSM ignores files that were deleted.
If you use the backup image command, first with mode=selective then followed one or more times with mode=incremental, the incremental option causes the original image to be restored. The restore may include files that were later deleted plus the latest versions of files added or changed after the original image backup. If logical volumes are running at or near capacity, the result could be an out-of-space condition during the restore.
Note that the deletefiles option is allowed on the restore image command, but the server ignores it because the server is not aware of any deleted files. For more information, see "Incremental-by-Date".
Note: | Using mode=incremental causes TSM to back up only files that have a changed date, not files that have changed permissions. |
If compression=yes, an image backup is compressed, but the statistics may show 0% compression, and the progress indicator may reflect the number of bytes being passed to the compression function, not the number of bytes sent to the server after compression. To verify that compression occurred, use the administrator command, query content f=d.
Syntax
.-------------------. V | >>-Backup Image---+-----------+------+-------------+--+-------->< '- options--' +- filespec---+ '- "filespec"-'
Parameters
Examples
Command: dsmc backup image /home/test -mode=incremental
Command: dsmc backup image /dev/lv01
The cancel restore command displays a list of your restartable restore sessions in the server database. You can only cancel one restartable restore session at a time. Run the cancel restore command again to cancel additional restores. To restart restartable restore sessions, use the restart restore command.
Use the cancel restore command when:
Syntax
>>-CANcel Restore---+-----------+------------------------------>< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the cancel restore command.
Command: cancel restore
The delete access command deletes authorization rules for files or imagesthat are stored on the server. When you delete an authorization rule, you revoke user access to any files or images specified by that rule.
Syntax
>>-Delete ACcess---+-----------------+------------------------->< | .-----------. | | V | | '---- options--+--'
Parameters
Examples
The following are examples of tasks you might perform using the delete access command.
Command: delete access
See the following screen example:
Index Type Node Owner Path _____ _______ ____________________________________ 1 Backup NODE1 USER1 home/dev/proja/list/ 2 Archive NODE3 LUIE home/fin/budg/depta/ 3 Backup NODE4 USER2 home/plan/exp/deptc/ 4 Archive NODE5 USER2S home/mfg/invn/parta/ Enter Index of rule(s) to delete, or quit to cancel:
To delete the authorization rules that let luie and user2s access your files or images, type: 2 4 or (2,4) and press Enter.
The delete archive command deletes archived files from TSM storage. Your administrator must give you authority to delete archived files.
Attention: When you delete archived files, you cannot retrieve them. Verify that the files are obsolete before you delete them.
Syntax
>>-Delete ARchive---+-----------+---+- filespec---+------------>< '- options--' '- "filespec"-'
Parameters
You can use the subdir common option with the delete archive command. For information about common options, see Chapter 8, "Setting Common Options".
Examples
The following are examples of tasks you might perform using the delete archive command.
Command: del ar /user/home/proj1/budget
Command: del arch "/user/home/proj1/*.txt"
Command: d ar "/user/project/*" -pick
TSM authorized user
The delete filespace command deletes file spaces from TSM storage. A file space is a logical space on the server that contains files or images you backed up or archived. TSM assigns a separate file space on the server for each file system at your workstation from which you back up or archive files. The file space name is the same as the file system name. When you enter the delete filespace command, TSM displays a list of your file spaces. Select those file spaces that you want to delete from this list.
Your administrator must give you authority to delete a file space. You need BACKDEL authority if the file space you want to delete contains backup versions, or ARCHDEL authority if the file space contains archive copies. If the file space contains both backup versions and archive copies, you need both types of authority.
Attention: When you delete a file space, you delete all backup versions and archive copies within that file space. When you delete a file space, you cannot restore the files or images. Verify that the files or images are obsolete before you delete them.
Syntax
>>-Delete Filespace---+-----------+---------------------------->< '- options--'
Parameters
Examples
The following are examples of tasks you might perform using the delete filespace command.
Command: delete filespace
Command: del f
The help command displays help information for the command line client. Enter the number of the topic that you want to view. If there is more than one screen of topics, scroll backward or forward through the Table of Contents. To exit, type q and press Enter.
Syntax
>>-Help---+-----------+---------------------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the help command.
Command: help
The incremental command backs up all new or changed files or directories in the default client domain or from file systems, directories, or files you specify that are not excluded from backup services.
To incrementally back up selected files or directories, specify the file specification in the command. The default is to back up files or directories in the default domain.
The following attributes in the management class assigned to the file or directory affect whether the data is actually backed up:
For more information on management classes, see Chapter 6, "Understanding Storage Management Policies".
You can assign the default management class to a file, or you can assign a specific management class to a file using the include option in an include-exclude list.
You can perform either a full incremental backup or an incremental by date backup. The default is a full incremental backup.
You can also the selective command to perform a selective backup that backs up only the files, directories or empty directories that you specify. See Selective for more information.
A full incremental backs up all files or directories that are new, or have changed since the last incremental backup. During a full incremental backup, the client queries the server to determine the exact condition of your storage. TSM uses this information to:
An incremental-by-date backup, backs up new and changed files with a modification date later than the date of the last incremental backup stored at the server, unless the files are excluded from backup by an exclude statement.
If an incremental-by-date is performed on only part of a file system, the date of the last full incremental is not updated, and the next incremental-by-date will back up these files again. Therefore, changes to the access control lists (ACL) are not backed up during an incremental-by-date. Use the query filespace command to determine the date and time of the last incremental backup of the entire file system.
To perform an incremental-by-date backup, use the incrbydate option with the incremental command.
Unlike a full incremental, an incremental-by-date does not maintain current server storage of all your workstation files because:
For these reasons, it is recommended that if you have limited time during the week to perform backups, but extra time on the weekends, you can use a partial incremental backup on weekdays, and a full incremental backup on weekends to maintain current server storage of your workstation files.
If the incremental command is retried because of a communication failure or session loss, the transfer statistics will display the number of bytes TSM attempted to transfer during all commands attempts. Therefore, the statistics for bytes transferred may not match the file statistics, such as those for file size.
Syntax
.-------------------. V | >>-Incremental---+-----------+------+-------------+--+--------->< '- options--' +- filespec---+ '- "filespec"-'
Parameters
You can use the following common options with the incremental command: changingretries, domain, memoryefficientbackup, subdir, tapeprompt. For information about these options, see Chapter 8, "Setting Common Options".
If a file system is specified, all new and changed files are backed up and the last incremental date for the file space is updated on the server. If a file or directory is specified, the last incremental date is not updated, so the file or directory might be backed up again if a later backup is performed using the incrbydate option.
If a file system is specified, specify the file system without a trailing slash.
Examples
The following are examples of tasks you might perform using the incremental command.
Command: Incremental
Command: Incremental /home /usr /proj
Command: Incremental /proj/test/
Command: Incremental -incrbydate /home
Command: Incremental -subdir=yes "/fs/dir1/abc*"
Command: Incremental -subdir=yes /fs/dir1/abc
Command: Incremental -subdir=yes /fs/dir1
Command: Incremental -subdir=yes /fs/dir1/
The loop command starts an interactive command line session that is maintained until you enter quit. In an interactive command line session, it is unnecessary to precede each command name with dsmc and your password, if one is required. After you start an interactive session, most of the options you entered with other commands are in effect throughout the session, unless you enter them again using a different setting.
You can enter all valid commands in interactive mode except the schedule and loop commands.
Some options cannot be used within the interactive session created by the loop command, and are identified in the option description by this statement: This option is valid only on the initial command line. It is not valid in interactive mode.
See Chapter 8, "Setting Common Options" for options that cannot be used in interactive mode.
Syntax
>>-LOOP---+-----------+---------------------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the loop command.
Command: dsmc
The macro command sends a series of commands that you specify in a macro file. By including the macro command within a macro file, you can nest as many as ten levels of commands.
Comment lines are not supported within the macro file specified for the macro command.
Syntax
>>-MAcro- macroname--------------------------------------------><
Parameters
Examples
The following is an example of how to use the macro command.
Command: macro backabc.mac
where backabc.mac contains the following statements:
Selective /devel/project/proja/ Selective /devel/project/projb/ Selective /devel/project/projc/
The query access command displays a list of users to whom you have given access to backup versions or archive copies of specific files. TSM displays a list of authorization rules that you defined with the set access command, or with User Access List on the graphical user interface (GUI) Utilities menu. The information includes:
Syntax
>>-Query ACcess---+-----------+-------------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the query access command.
Command: query access
The query archive command displays a list of your archived files, the file size, archive date, file specification, expiration date, and file description.
Syntax
>>-Query ARchive---+-----------+---+- filespec---+------------->< '- options--' '- "filespec"-'
Parameters
You can use the following common options with the query archive command: scrolllines, scrollprompt, subdir. See Chapter 8, "Setting Common Options" for more information..
Examples
The following are examples of tasks you might perform using the query archive command.
Command: q archive "*"
Command: query archive "/devel/*" -subdir=yes
Command: q ar -date=5 -time=1 "*"
Command:q ar -date=1 -time=4 "/home/proj/proj*"
The query backup command displays a list of backup versions of your files. For each backup version, TSM displays the file specification, file size, backup date, whether the file is active or inactive, and the management class to which the file is assigned. TSM displays only the first ten characters of the management class name.
Syntax
>>-Query Backup---+-----------+---+- filespec---+-------------->< '- options--' '- "filespec"-'
Parameters
You can use the subdir, scrolllines and scrollprompt common options with the query backup command. See Chapter 8, "Setting Common Options" for information about these common options.
Examples
The following are examples of tasks you might perform using the query backup command.
Command: query backup -inactive "*"
Command: q b-date=1 -time=4 "/home/proj/proj*"
Command: q b-date=5 -time=1 -ina -su=yes /home/
The query backupset command queries a backup set from a local file or the server. You can also query a backup set from an 8MM tape device. You must be a root user to query a backupset from the server. Attributes, directories, and files associated with the backup set are displayed.
Syntax
>>-Query BACKUPSET---+---------+---+- backupsetname-+---------->< '-options-' '- filename------'
Parameters
You can use these common options with the query backupset command: scrolllines and scrollprompt. See Chapter 8, "Setting Common Options" for information about these common options.
Examples
The following are examples of tasks you might perform using the query backupset command.
Command: query backupset "mybackupsetname" -loc=server
Command: dsmc query backupset "/home/budget /backupsetfile.name" -loc=file
Command: dsmc query backupset /dev/rmt0 -loc=tape
The query filespace command displays a list of file spaces for a node stored on the server. A file space is a logical space on the server that contains files you backed up or archived. TSM assigns a separate file space on the server for each file system at your workstation from which you back up or archive files. The file space name is the same as the file system name.
Syntax
>>-Query Filespace---+-----------+----------------------------->< '- options--'
Parameters
You can use the scrolllines and scrollprompt options with the query filespace command. See Chapter 8, "Setting Common Options" for more information..
Examples
The following are examples of tasks you might perform using the query filespace command.
Command: query filespace
Note: | This command is not valid for the following UNIX clients: Linux, SGI, Unixware, PTX, and Tru64. |
The query image command displays information about images backed up by a client. The options are used to determine the content and detail of the information.
Syntax
>>-Query Image---+----------+---+- logicalvolumename-+--------->< '- options-' '- filespacename-----'
Parameters
You can also use the scrolllines and scrollprompt common options with the query image command. For more information about these common options, see Chapter 8, "Setting Common Options".
Omitting logicalvolumename and filespacename causes all images to display.
Examples
The following are examples of tasks you might perform using the query image command.
Command: q image
Command: query image -fromnode=avalon -fromowner=kutras
Command: q i /usr -inactive
The query mgmtclass command displays information about the management classes available in your active policy set.
Your administrator defines management classes that contain attributes controlling whether a file is eligible for backup or archive services. They also contain attributes that determine how TSM manages the backups and archives after they reach the server.
Your active policy set contains a default management class; it can contain any number of additional management classes. You can assign specific management classes to files using include options that are located in the client options file. If you do not assign a management class to a file, TSM uses the default management class.
Syntax
>>-Query Mgmtclass---+-----------+----------------------------->< '- options--'
Parameters
You can also use the scrolllines and scrollprompt common options with the query mgmtclass command. For more information about these common options, see Chapter 8, "Setting Common Options".
Examples
The following are examples of tasks you might perform using the query mgmtclass command.
Command: query mgmtclass
The query restore command displays a list of your restartable restore sessions in the server database. The list contains the following fields: owner, replace, subdir, preservepath, source, and destination.
Certain restore operations, called restartable restore sessions, start a special protocol within TSM. Some restore sessions can be restarted for these reasons:
Syntax
>>-Query Restore---+-----------+------------------------------->< '- options--'
Parameters
Examples
The following are examples of tasks you might perform using the query restore command.
Command: query restore
The query schedule command displays the events scheduled for your node. Your administrator can set up schedules to perform automatic backups and archives for you. To plan your work, use this command to determine when the next scheduled events occur.
Syntax
>>-Query SCHedule---+-----------+------------------------------>< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the query schedule command.
Command: query schedule
The query session command displays information about your TSM session, including the current node name, when the session was established, server information, and server connection information.
Syntax
>>-Query SEssion---+-----------+------------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the query session command.
Command: query session
A sample query session display follows:
Tivoli Storage Manager Command Line Backup Client Interface - Version 3, Release 7, Level 0.0 (C) Copyright IBM Corporation, 1990, 1999 All Rights Reserved. Node Name: EPSILON3 Session established with server FIJI_0918GA: AIX-RS/6000 Server Version 3, Release 1, Level 0.0 Server date/time: 09/04/1999 15:09:52 Last access: 09/04/1999 15:09:40 Server Connection Information Server Name.............: FIJI_0918GA Server Type.............: AIX-RS/6000 Server Version..........: Ver. 3, Rel. 1, Lev. 0.0 Last Access Date........: 09/04/1999 15:09:40 Delete Backup Files.....: Yes Delete Archive Files....: Yes Node Name...............: EPSILON3 User Name...............: thompson
The restart restore command displays a list of your restartable restore sessions in the server database. You can only cancel one restartable restore session at a time. Run the restart restore command again to cancel additional restores.
The restarted restore uses the same options you used in the failed restore. The restarted restore continues from the point at which the restore previously failed.
To cancel restartable restore sessions, use the cancel restore command. Use the restart restore command when:
Options from the failed session supersede new or changed options for the restarted session.
Syntax
>>-RESTArt Restore---+-----------+----------------------------->< '- options--'
Parameters
For information about common options you can use with the restart restore command, see Chapter 8, "Setting Common Options".
Examples
Following is an example of a task you might perform using the restart restore command.
Command: restart restore
The restore command obtains copies of backup versions of your files from a TSM server. To restore files, specify the directories or selected files, or select the files from a list. Restore files to the directory from which you backed them up, or to a different directory. TSM uses the preservepath option with the subtree value as the default for restoring files. For more information on this option, see Chapter 9, "Using Options With Commands".
When an entire directory or directory tree is restored, and the inactive, latest, pick, todate, and fromdate options are not specified on the restore command, TSM tracks which objects are restored. If the restore process is interrupted for any reason, you can restart the restore at the point of interruption by entering the restart restore command. It is possible to create more than one restartable restore session. Restores are only restartable if the file spec is fully wildcarded. For example, for a restore which is restartable, enter:
dsmc rest /home/* -sub=yes
For a restore which is not restartable, enter:
dsmc rest /home/file?.c -sub=yes
Use the query restore command to display a list of your restartable restore sessions in the server database. Further backups of the file system cannot be performed unless the restartable restore completes using the restart restore command, or is cancelled using the cancel restore command.
Syntax
>>-REStore---+--------+---+-----------+---+- sourcefilespec---+-> '- FILE--' '- options--' '- "sourcefilespec"-' >-----+----------------------+--------------------------------->< '- destinationfilespec-'
Parameters
You can use these common options with the restore command: replace, restoremigstate, subdir. See Chapter 8, "Setting Common Options" for information about common options.
Examples
The following are examples of tasks you might perform using the restore command.
Command: restore /home/devel/projecta/budget
Command: restore file budget
Command: restore "/home/devel/projecta/*.c"
Command: restore "/user/project/*" -pick -inactive
Command: restore "/home/devel/projecta/*.c" /home/newdevel/projectn/
Command: res -pitd=8/17/1998 -pitt=13:00:00 /home/mydir/
Command: res /home/myid/*
The restore backupset command restores a backup set from the server or a local file. If you are restoring a file space from a backupset to a system that did not perform the original backup, you may need to either specify a destination or use the following syntax to correctly specify the source file, or you may need to do both.
dsmc restore backupset backupsetname {/fsname}/* /destfs/ -subdir=yes
You must be a root user to restore an entire backup set from the server, otherwise only files you own are restored.A backup set can also be restored from a tape device on the AIX, Solaris, and HP clients. See Location for information on supported tape devices and how to specify these devices.
If you are unable to restore a backup set from portable media to your client machine, check with your TSM administrator to ensure that the portable media was created on a device using a format that is compatible with your device.
Syntax
>>-REStore BACKUPSET---+---------+---+- backupsetname-+---------> '-options-' '- filename------' >-----+- sourcefilespec---+---+----------------------+--------->< '- "sourcefilespec"-' '- destinationfilespec-'
Parameters
You can use these common options with the restore backupset command: quiet, replace, and subdir. See Chapter 8, "Setting Common Options" for information about these common options.
Examples
The following are examples of tasks you might perform using the restore backupset command.
Command: dsmc restore backupset mybackupsetname -loc=server
Command: dsmc restore backupset "/home/budget/backupsetfile.name -loc=file
Command: dsmc restore backupset "/dev/rmt0" -loc=tape
Command: dsmc restore backupset /dev/rmt0 "/home/jones/budget.dev" -loc=tape
Command: dsmc restore backupset /dev/rmt0 "/home/budget/*.txt" -loc=tape
Command: dsmc restore backupset bset01.001 -loc=server
Command: dsmc restore backupset "/home/jones/bset01.file" -loc=file
Note: | This command is not valid for the following UNIX clients: Linux, SGI, Unixware, PTX, and Tru64. |
The restore image command restores a single file system image that was backed up using the backup image command. This command can restore an active base image, or a point-in-time base image, with associated incremental updates.
Syntax
>>-REStore Image---+----------+---+- sourcefilespec---+---------> '- options-' '- "sourcefilespec"-' >-----+----------------------+--------------------------------->< '- destinationfilespec-'
Parameters
The restore image command does not define or mount the destination file space. The destination file space must exist, it must be mounted, and it must be large enough to hold the source. If file systems are mounted on volume images, and you restore them to a different location, be aware of the following points:
Examples
Command: dsmc rest image /home/test
Command: dsmc restore image /home/proj -incremental -deletefiles
The retrieve command obtains copies of archived files from the server. You can retrieve specific files or entire directories. Use the description option to specify the descriptions assigned to the files you want to retrieve.
Place the retrieved files in the same directory from which they were archived, or in a different directory. TSM uses the preservepath option with the subtree value as the default for restoring files. For more information on this option, see Chapter 9, "Using Options With Commands".
Syntax
>>-RETrieve---+-----------+---+- sourcefilespec---+-------------> '- options--' '- "sourcefilespec"-' >-----+----------------------+--------------------------------->< '- destinationfilespec-'
Parameters
You can use these common options with the retrieve command: replace, restoremigstate, subdir, tapeprompt. See Chapter 8, "Setting Common Options" for information about common options.
Examples
The following are examples of tasks you might perform using the retrieve command.
Command: retrieve /home/devel/projecta/budget
Command: retrieve "/home/devel/projecta/*.c"
Command: retrieve "/home/"
Command: retrieve "/home/devel/projecta/*.c" /home/newdevel/projectn/
Command: ret "/user/project/*" -pick
Command: retrieve "/proj/*" -desc="1999 survey results"
Command:
mkfifo fifo dd if=fifo of=/dev/rmt1& dsmc retrieve -replace=yes -description="mybudget" /home/devel/budget fifo
TSM authorized user
The schedule command starts the client scheduler on your workstation. The client scheduler must be running before scheduled work can start.
When you start the client scheduler, it continuously contacts the server for scheduled events based on the time you specified with the queryschedperiod option in your client options file. If your administrator sets this option for all nodes, that setting overrides your setting.
If you are using TCP/IP communications, the server can prompt your workstation when it is time to run a scheduled event. To do so, set the schedmode option to prompted in the client options file or on the schedule command.
After you start the client scheduler, it continues to run and to start scheduled events until you press Ctrl+C, stop the scheduler process with the UNIX kill command, start the machine again, or turn off the machine to end it.
Note: | You cannot enter this command in interactive mode. |
Syntax
>>-SCHedule---+-----------+------------------------------------>< '- options--'
Parameters
Examples
The following are examples of tasks you might perform using the schedule command.
Command: tsm::once:/usr/lpp/adsm/bin/dsmc sched > /dev/null 2>&1 #TSM Scheduler
Command: nohup dsmc sched 2> /dev/null &
The selective command backs up files that you specify. If these files become damaged or lost, you can replace them with backup versions from the server. When you run a selective backup, TSM backs up all the files unless they are excluded from backup in your include-exclude list, or they do not meet management class requirements for serialization.
During a selective backup, TSM sends copies of the files to the server even if they have not changed since the last backup. This might 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.
During a selective backup, a directory path may be backed up, even if the specific file that was targeted for backup is not found. For example:
dsmc selective "/dir1/dir2/bogus.txt"
still backs up dir1 and dir2 even if the file bogus.txt does not exist.
If the selective command is retried because of a communication failure or session loss, the transfer statistics will display the number of bytes TSM attempts to transfer during all command attempts. Therefore, the statistics for bytes transferred may not match the file statistics, such as those for file size.
Syntax
.------------------. V | >>-Selective---+-----------+-----+- filespec---+--+------------>< '- options--' '- "filespec"-'
Parameters
You can use these common options with the selective command: changingretries, quiet, tapeprompt, and subdir. See Chapter 8, "Setting Common Options" for information about these common options.
Examples
The following are examples of tasks you can perform using the selective command.
Command: selective /home/devel/proja
Command: selective "/home/devel/proj*"
Command: selective "/home/devel/proj*" /user/home/budget
Command: selective /home/
The set access command gives users at other nodes access to your backup versions, archived copies, or backup images. You can give another user access to a specific file or image, multiple files or images, or all files or images in a directory. When you give access to another user, that user can restore or retrieve your objects. Specify in the command whether you are giving access to archives or backups.
Note: | You cannot give access to both archives and backups using a single command. |
Syntax
>>-SET Access---+- Archive-+---+- filespec-+--- node------------> '- Backup--' '-image-fs--' >-----+-------+---+-----------------+-------------------------->< '- user-' | .-----------. | | V | | '---- options--+--'
Parameters
If you give access to a branch of the current working directory, you only need to specify the branch. If you give access to objects that are not in a branch of the current working directory, you must specify the drive and directory. The file spec to which you gave access must have at least one backup version or archive copy object (file or directory) on the server.
To give access to all objects below a certain level, use an asterisk, directory delimiter, and an asterisk at the end of your file spec. For example, to give access to all objects below home/test, use file spec home/test/*/*.
To specify all files or images in a named directory, enter home/mine/proj1/* on the command line. To specify all files or images in all directories off of the root directory, enter /*/* on the command line. Enter /* on one set access command and /*/* on another if you want another user to have complete access to your file space. The first /* gives access to all subdirectories and all files or images off of the root directory.
Examples
The following are examples of tasks you might perform using the set access command:
Command: set access backup /home/user/budget node_2
Command: set access ret "/home/devel/proja/*.c" node_3 user_c
Command: set ac archive /home/devel/proja/node_3
Command: set ac b {project} "*" "*bldgb"
Command: set ac b "/acct/paid/*/*" "*"
Command: set acc backup "home/devel/proja/*/*" node_5 serena
TSM authorized user
The set password command changes the TSM password for your workstation. You are prompted twice for your new password.
A password is not case-sensitive, and it can be as many as 64 characters. Valid characters are:
Syntax
>>-SET Password---+--------------+---+-----------+------------->< '- oldpw newpw-' '- options--'
Parameters
Examples
The following is an example of using the set password command.
Command: set password osecret nsecret