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. Table 27 shows a list of tasks related to entering commands.
Command | Description | Page |
---|---|---|
archive | Archives files from a workstation to TSM storage. | Archive |
backup actived | Backs up a Windows 2000 active directory database. | Backup Activedirectory |
backup certserverdb | Backs up a Windows 2000 certificate server database. | Backup Certserverdb |
backup clusterdb | Backs up the Microsoft cluster services cluster database on a Windows 2000 server. | Backup Clusterdb |
backup complusdb | Backs up the Windows 2000 COM+ database. | Backup Complusdb |
backup eventlog | Backs up Windows NT and Windows 2000 event logs. | Backup Eventlog |
backup frs | Backs up a replicated file system on Windows 2000. | Backup FRS |
backup rsm | Backs up the removable storage manager database on a Windows 2000 server. | Backup RSM |
backup sysfiles | Backs up Windows 2000 system and boot files. | Backup Sysfiles |
backup sysvol | Backs up the Windows 2000 server system volume. | Backup Sysvol |
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. | Query Backupset |
query filespace | Displays a list of file spaces in TSM storage. | Query Filespace |
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 actived | Restores a Windows 2000 server active directory database. | Restore Activedirectory |
restore backupset | Restores a backup set from the server or a local file. | Restore Backupset |
restore certserverdb | Restores a Windows 2000 server certificate server database. | Restore Certserverdb |
restore clusterdb | Restores the Microsoft cluster services cluster database on a Windows 2000 server. | Restore Clusterdb |
restore complusdb | Restores a Windows 2000 COM+ database. | Restore Complusdb |
restore eventlog | Restores Windows NT and Windows 2000 event logs. | Restore Eventlog |
restore frs | Restores a replicated file system on a Windows 2000 server. | Restore FRS |
restore registry | Restores the Windows registry. | Restore Registry |
restore rsm | Restores files the RSM database on Windows 2000. | Restore RSM |
restore sysfiles | Restores Windows 2000 system and boot files. | Restore Sysfiles |
restore sysvol | Restores the Windows 2000 server system volume. | Restore Sysvol |
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 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. 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 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 c:\project directory, you would enter:
dsmc archive c:\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 c:\project\budget.fin to c:\newproj\newbudg.fin, you would enter:
dsmc restore c:\project\budget.fin c:\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 c:\fs\dir1\* mydir\
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 c:\home\mydir\ c:\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 c:\home\mydir c:\away\yourdir
dsmc set access c:\fs\dir1\*\*
\\Server_Name\Dfs_Root_Name\path \\Fault_Tolerant_Name\Dfs_Root_Name\path
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. Table 29 lists other functions you can perform when you recall
commands.
Table 29. 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 eight spaces to the right. | Tab right |
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 |
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, drives, or directories. 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:
Table 30 shows examples of each wildcard.
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 |
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--'
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 c:\plan\proj1\budget.jan
Command: archive c:\plan\proj1\*.txt
Command: archive -subdir=yes c:\*.*
Command: archive \\myserver\mydfsroot\mydfsvolume\*.*
The backup activedirectory command backs up an active directory database on a Windows 2000 server operating system which is running Active Directory Services. TSM backs up the database and its associated transaction logs. After the database and logs are backed up, the logs are deleted.
You can back up an active directory, either on a local machine or on the server. For information on system objects that must be backed up together, see "Backing Up System Objects".
Syntax
>>-BACKup ACTIVED---+-----------+------------------------------>< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the backup activedirectory command.
Command: backup actived
The backup certserverdb command backs up a Windows 2000 certificate server database, specifically the server database of client x.509 certificates. For information on system objects that must be backed up together, see "Backing Up System Objects".
This command is valid for Windows 2000 Server operating systems.
Syntax
>>-BACKup CERTServerdb---+-----------+------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the backup certserverdb command.
Command: back certs
The backup clusterdb command backs up a Windows 2000 Microsoft Cluster Services cluster database for the local cluster.For information on system objects that must be backed up together, see "Backing Up System Objects".
This command is valid for Windows 2000 server operating systems.
Syntax
>>-BACKup CLUSTERDB---+-----------+---------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the backup clusterdb command.
Command: back clusterdb
The backup complusdb command backs up the Windows 2000 COM+ database. COM is a system component model that creates non-graphic entities without the need to rely on language features of the entity's particular class. COM+ is the integration of Microsoft Transaction Server (MTS) and Microsoft Message Queuing (MSMQ) with the core operating system.
For information on system objects that must be backed up together, see "Backing Up System Objects".
This command is valid for Windows 2000 server and Windows 2000 Professional operating systems.
Syntax
>>-BACKup COMPlusdb---+-----------+---------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the backup complusdb command.
Command: back comp
The backup eventlog command backs up the Windows NT and Windows 2000 event logs.
You can back up one or a combination of these logs. The log copies are saved in the adsm.sys\eventlog directory under root directory of the system drive prior to being sent to the server for backup.
Syntax
>>-BACKup Eventlog---+- ENTIRE---------------+---+-----------+->< '- LOG-+- APPLICATION-+-' '- options--' +- SECURITY----+ '- SYSTEM------'
Parameters
Examples
The following are examples of tasks you might perform using the backup eventlog command.
Command: back event entire
Command: back event log security
The backup frs command backs up the File Replication Services (FRS) data on a Windows 2000 server operating system. FRS maintains a list of replicated files; TSM backs up the files that display in this list.
This command is valid for Windows 2000 server operating systems.
Syntax
>>-BACKup FRs---+-----------+---------------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the backup frs command.
Command: back frs
The backup registry command backs up the Windows registries. The registry is a centralized database that contains information about hardware, applications, and operating system settings for each machine on the network. Normally, the registry is backed up during incremental backups.
Use the backup registry command only if you selected the backupreg option to prevent TSM from backing up the registry during incremental backups, or if you must back up the registry immediately.
Registry backups are copied to the adsm.sys directory under the root directory of the system drive. If you are using Windows 95 or Windows 98, the files are adsm95.sys and adsm98.sys, respectively. The registry is then copied to the server. TSM will not back up the copied registry files in the adsm.sys directory if you excluded the files in your include-exclude list.
To back up all profiles in hkey_users, you can issue the command backup registry user curuser. The name of the profile will be the actual registry key with the following filename:
adsm.sys\registry\machine\users\userprofiledir\ S-1-5-21-8533442-1654749355-78804774-1152This registry key also identifies the SID of the current user.
where: machine is the name of the machine on which the profiles reside and userprofiledir is the user profile directory specified in the registry for that user.
If you are running as a local user through the Web client, Restore User Profile is greyed out because on a local system account, there is no user profile to restore.
For information on system objects that must be backed up together, see "Backing Up System Objects".
Syntax
>>-BACKup REgistry---+- ENTIRE----------------+---+-----------+->< +- MACHINE-+- CONFIG---+-+ '- options--' | +- ENUM-----+ | | +- HARDWARE-+ | | +- NETWORK--+ | | +- SAM------+ | | +- SECURITY-+ | | +- SOFTWARE-+ | | '- SYSTEM---' | '- USER-+- CURUSER-+-----' '- DEFAULT-'
Parameters
Examples
The following are examples of tasks you might perform using the backup registry command.
Command: backup reg entire
Command: backup reg machine sam
Removable Storage Manager (RSM) is a service that runs on Windows 2000 Server and Windows NT Server operating systems. The backup rsm command backs up the RSM database. The backup copy is placed in \windows\system32\ntmsdata\export. Then the command performs a selective back up of the copy to the server. The RSM server continues to run during the backup process.
Windows 2000 servers (server, advanced server and datacenter server) may allow many applications to share a bulk storage device. On these servers, RSM manages data on removable storage media that exists in a media pool. This data is accessible by media application and media management programs and can be shared and traced across applications. TSM servers support RSM by creating application pools for backup media. TSM clients support RSM recovery by creating a backup of the RSM database when running on a Windows 2000 server.
To restore the files, use the rsm option on the restore command.
Syntax
>>-BACKup RSm---+-----------+---------------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the backup rsm command.
Command: back rsm
The backup sysfiles command backs up Windows 2000 system and boot files. System and boot files consist of the following:
These files are backed up as a single system object; however, individual files within this object are backed up as normal files.
For information on system objects that must be backed up together, see "Backing Up System Objects".
Syntax
>>-BACKup SYSFiles---+-----------+----------------------------->< '- options--'
Parameters
Examples
The following are examples of tasks you might perform using the backup sysfiles command.
Command: back sysf
The backup sysvol command backs up a Windows 2000 system volume. This is data that has been replicated from the active directory and that is not part of the directory tree database. System volume data must be marked as such in the FRS set.
This system object is found only on a Windows 2000 server functioning as a domain controller.
For information on system objects that must be backed up together, see "Backing Up System Objects".
Syntax
>>-BACKup SYSVol---+-----------+------------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the backup sysvol command.
Command: back sysvol
The cancel restore command displays a list of your restartable restore sessions in the server database. You can select zero or more restartable restore sessions that you want to cancel. 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 that are stored on the server. When you delete an authorization rule, you revoke user access to any files specified by that rule.
Syntax
>>-Delete ACcess---+-----------+------------------------------->< '- 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 daisy c:\dev\proja\list.c 2 Archive node3 marm c:\fin\budg\depta.jan 3 Backup node4 susie c:\plan\exp\deptc.feb 4 Archive node5 susies c:\mfg\invn\parta.wip Enter Index of rule(s) to delete, or quit to cancel:
To delete the authorization rules that allow marm and susies to access your files, 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---+-----------+-------------------------------> '- options--' >-----+- filespec----------------+----------------------------->< '- {filespacename}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".
Note: | If you include filespacename, do not include a drive letter in the file specification. |
Use the file space name if the drive label name has changed, or if you are deleting files archived from another node with drive labels that are different from yours. You must specify a mixed or lowercase NTFS file space name enclosed in quotes and braces. For example, {"NTFSDrive"}. If TSM is running in loop mode, then either single quotes or double quotes are valid. For example: {"NTFSDrive"} and {'NTFSDrive'} are both valid. If TSM is running in batch mode, only single quotes are valid. The single quotes requirement is a restriction of the operating system.
Examples
The following are examples of tasks you might perform using the delete archive command.
Command: del arc {abc}\proj\*.*
Command: del arch c:\plan\proj1\budget.jan
Command: del arch c:\plan\proj1\*.txt
Command: d ar c:\project\*.* -pick
The delete filespace command deletes file spaces from TSM storage. 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 drive at your workstation from which you back up or archive files. The file space name is the same as the drive label 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. Verify that the files 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:
If you perform an incremental backup of a file space on which a volume is mounted, TSM does not traverse the mount junction and back up all mounted data. For example, if you have a mounted volume named c:\mount on file space c:, TSM backs up only the junction point, not the data under c:\mount.
To back up all data for a file system, including virtual volumes and virtual mount points, run an incremental backup on each virtual volume in addition to performing an incremental backup on the file system.
The exclude.dir option is not valid for a mounted virtual volume if the volume is backed up as a file space. Exclude.dir is valid for a mount point that is backed up.
If you perform an incremental backup of Microsoft DFS root and the dfsbackupmntpnt=yes option is specified, TSM backs up only the junction points and does not back up the subtree under the junctions.
If you want TSM to traverse the DFS tree and back up the files and subdirectories of any junction it encounters, specify the dfsbackupmntpnt=no option.
This option has no effect if you are backing up individual junctions. The exclude.dir option behavior for DFS junctions is same as for mounted virtual volumes.
See Dfsbackupmntpnt for more information about the dfsbackupmntpnt option.
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. 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.
If you plan to perform an adaptive subfile backup, ensure that you specify the subfilebackup, subfilecachep and subfilecaches options during the initial backup of your file. The options specify whether an adaptive subfile backup is to be performed and the path and size of the data to be transferred. For information on these options, see Chapter 8, "Setting Common Options". For information about adaptive subfile backups, see "Performing a Backup with limited Bandwidth".
Syntax
>>-Incremental---+-----------+---+-----------------+----------->< '- options--' | .------------. | | V | | '---- 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: i c: d: e:
Command: i \home\ngai
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 c:\devel\project\proja\*.* selective c:\devel\project\projb\*.* selective c:\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--' '- {filespacename}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..
Note: | If you include filespacename, do not include a drive letter in the file specification. |
Use the file space name if the drive label has changed, or if you are querying files archived from another node whose drive labels are different from yours.
Note: | You must specify a mixed or lowercase NTFS file space name enclosed in quotes and braces. For example, {"NTFSDrive"}. If TSM is running in loop mode, then either single quotes or double quotes are valid. For example: {"NTFSDrive"} and {'NTFSDrive'} are both valid. If TSM is running in batch mode, only single quotes are valid. The single quotes requirement is a restriction of the operating system. |
Examples
The following are examples of tasks you might perform using the query archive command.
Command: q ar c:\proj\*
Command: q ar -date=5 -time=4 c:\proj\*
Command: q ar -date=5 -time=4 c:\proj\*.dev
Command: q ar {store}\proj\*
Command: q ar {docs}\*
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--' '- {filespacename}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.
Note: | If you include filespacename, do not include a drive letter in the file specification. |
Use the file space name if the drive label name has changed, or if you are querying files backed up from another node with drive label names that are different from yours.
Note: | You must specify a mixed or lowercase NTFS file space name enclosed in quotes and braces. For example, {"NTFSDrive"}. If TSM is running in loop mode, then either single quotes or double quotes are valid. For example: {"NTFSDrive"} and {'NTFSDrive'} are both valid. If TSM is running in batch mode, only single quotes are valid. The single quotes requirement is a restriction of the operating system. |
Examples
The following are examples of tasks you might perform using the query backup command.
Command: q b {abc}\proj\*.*
Command: q backup -ina c:\proj\*
Command: q b -date=5 -time=4 -ina c:\proj\*
Command: q b {docs}\*
The query backupset command queries a backup set from a local file or 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: query backupset c:\budget\backupsetfile.name loc=file
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 drive at your workstation from which you back up or archive files. The file space name is the same as the drive label 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
Command: query filespace -date=5 -time=4
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.
Sess Restore Elapsed Node Name file space Number State Minutes Name ------ ----------- ------- --------- --------- 2 active 5 byufan EDISK -1 restartable 107 crockett OS2
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
The restart restore command displays a list of your restartable restore sessions in the server database. You can select zero or more restartable restore sessions that you want to restart.
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".
Note: | An error will occur if you attempt to restore a file whose name is the same
as an existing files's short name. For example, if you attempt to
restore a file you specifically named abcdef~1.doc
into the same directory where a file named abcdefghijk.doc
exists, the restore will fail because the Windows operating system equates the
file named abcdefghijk.doc to a short name of
abcdef~1.doc. The restore function treats this
as a duplicate file.
If this error should occur, perform any of the following actions to correct it:
|
If the restore command is retried because of a communication failure or session loss, the transfer statistics will display the bytes TSM attempted to transfer across all command attempts. Therefore, the statistics for bytes transferred may not match file statistics, such as those for file size.
When restoring all file system data, including virtual volumes and mount points, restore the virtual mount point before restoring any data inside the virtual volume. Otherwise, all data in the virtual volume is restored to the parent directory of the virtual volume.
You can restore a virtual mount point to a network drive; however, the restored mount point points to the virtual volume in the network machine, not to the local client virtual volume. For best results, only restore a virtual mount point to a network drive when the network machine already has the identical virtual mount point defined.
To restore a mount point using the GUI or Web client, you must restore the root of the drive where the mount point is defined. If you select the mount point itself, TSM restores all mounted data, but not the mount junction.
If you use the command line client to restore mounted data, you must back up the mount point in addition to backing up the mounted data. If the mount point is not backed up, you cannot restore any data inside the mounted volume using the command line client. For best results, back up at least one mount point for any virtual volumes you want to restore.
To restore Microsoft DFS junctions, you must restore Microsoft DFS root. If you select the junction point itself, TSM restores data under junction, but not the junction itself. If you select a junction point that no longer exists under DFS root, TSM creates a local directory under DFS root with the same name as the junction, before restoring data.
When restoring active and inactive versions of the same file using the replace option, only the most recently restored file is replaced.
If you are using client version 3.1.0.5 or later, the machine name is part of the file name. Therefore, if you back up files on one machine and you want to restore them to another machine, you must specify a destination. This is true even if you are restoring to the same physical machine, but the machine has a new name. For example, to restore the c:\doc\h2.doc file to its original directory on the machine, named star, you would enter:
dsmc restore c:\doc\h2.doc \\star\c$\
To restore the file to star which has now been renamed meteor, you would enter:
dsmc restore c:\doc\h2.doc \\meteor\c$\
You could also enter:
dsmc restore c:\doc\h2.doc \\star\c$\
This example is valid because if the machine name is not included in the specification, the local machine is assumed (meteor, in this case).
Syntax
>>-REStore---+--------+---+-----------+-------------------------> '- FILE--' '- options--' >-----+- sourcefilespec----------------+------------------------> '- {filespacename}sourcefilespec-' >-----+----------------------+--------------------------------->< '- destinationfilespec-'
Parameters
You can use these common options with the restore command: replace, subdir. See Chapter 8, "Setting Common Options" for information about common options.
Note: | If you include filespacename, do not include a drive letter in the file specification. |
Use the file space name if the drive label name has changed, or if you are restoring files backed up from another node with drive labels that are different from yours.
Note: | You must specify a mixed or lowercase NTFS file space name enclosed in quotes and braces. For example, {"NTFSDrive"}. If TSM is running in loop mode, then either single quotes or double quotes are valid. For example: {"NTFSDrive"} and {'NTFSDrive'} are both valid. If TSM is running in batch mode, only single quotes are valid. The single quotes requirement is a restriction of the operating system. |
If the destination drive does not exist, end the file specification either with a directory delimiter (\) or a file name. Otherwise, TSM assumes the last name is a file name and tries to repeatedly overwrite the file as each file is restored.
Examples
The following are examples of tasks you might perform using the restore command.
Command: restore c:\devel\projecta\budget.fin
Command: restore file budget.fin
Command: rest {abc}\proj\*.*
Command: rest c:\devel\projecta\*.c
Command: rest {winnt}\devel\projecta\*.c
Command: restore c:\devel\projecta\*.c c:\newdevel\projectn
Command: restore c:\project\* -pi -ina
The restore activedirectory command restores a Windows 2000 active directory database and associated logs from a TSM server. The active directory must be offline before you begin the restore. To begin the restore, reboot the system without the active directory. While the directory is offline, all user validation occurs using the Security Accounts Manager (SAM) in the registry.For information on system objects that must be restored together, see "Backing Up System Objects".
Syntax
>>-REStore ACTIVED---+-----------+----------------------------->< '- options--'
Parameters
Examples
Following is an example of a task you might perform using the restore activedirectory command.
Command: res actived
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 {\\machinename\c$}\* c:\destdir -subdir=yes
A backup set can also be restored from a tape device on the Windows NT and Windows 2000 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----------------+------------------------> '- {filespacename}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: restore backupset mybackupsetname -loc=server
Command: restore backupset c:\budget\backupsetfile.name -loc=file
The restore certserverdb command restores a Windows 2000 certificate server database. For information on system objects that must be restored together, see "Backing Up System Objects".
Syntax
>>-REStore CERTServerdb---+-----------+------------------------>< '- options--'
Parameters
Examples
Command: res certs
The restore clusterdb command restores a Windows 2000 Microsoft Cluster Services cluster database for the local cluster. For information on system objects that must be restored together, see "Backing Up System Objects".
Syntax
>>-REStore CLUSTERDB---+-----------+--------------------------->< '- options--'
Parameters
Examples
Command: res clusterdb
The restore complusdb command restores a Windows 2000 COM+ database. For information on system objects that must be restored together, see "Backing Up System Objects".
Syntax
>>-REStore COMPlusdb---+-----------+--------------------------->< '- options--'
Parameters
Examples
The following is an example of a task you might perform using the restore Complusdb command.
Command: restore compl
The restore eventlog command restores the Windows NT and Windows 2000 event logs.
Event logs are restored to the adsm.sys\eventlog.res directory under the root directory of the system drive or to a destination you specify.
Syntax
>>-REStore Eventlog---+- ENTIRE---------------+-----------------> '- LOG-+- APPLICATION-+-' +- SECURITY----+ '- SYSTEM------' >----- destinationfilespec---+-----------+--------------------->< '- options--'
Parameters
Examples
The following are examples of tasks you might perform using the restore eventlog command.
Command: rest event entire
Command: rest event log security
Command: rest event log system c:\tempdir
The restore frs command restores Windows 2000 replicated files. Replicated file systems are part of system state data and must be restored along with the other components of that data such as the registry, system volumes and the certificate server database.
Syntax
>>-REStore frs---+-----------+--------------------------------->< '- options--'
Parameters
Examples
Command: res frs
The restore registry command restores the Windows 95, 98 and NT registries. For information on system objects that must be restored together, see "Backing Up System Objects".
When you restore a registry key, you have a choice of whether or not to activate the key. A backup copy of the active registry and registry key is made in the adsm.sys\registry.sav file on the system drive root directory before the registry is restored. If Windows does not boot with the newly restored registry, you can used this saved copy to reboot. If you are using Windows 95 or Windows 98, the file would be adsm95.sys\registry.sav or adsm98.sys\registry.sav, respectively. The directory structure is the same as c:\adsm.sys\registry, which is described below.
If you cannot boot Windows, you might be able to manually restore the registry if you can boot another operating system that does not use the registry. During backup and restore, TSM saves copies of the registry on the machine in the following directories (assuming that your system drive is c:):
Note: | If you are using Windows 95, the directory name is adsm95.sys\registry. For Windows 98, it is adsm98.sys\registry. |
Be sure to restore the registry to the same workstation from which it was backed up, since the registry contains hardware and software information about the machine. If you try to restore to another machine, you may not be able to boot the machine.
If you have the NT Server Resource Kit installed, you can use the regrest standalone utility to restore the registries from the file TSM created when you ran the backup registry command. For example, assume that TSM has backed up a user profile to a file named guest, and you want to save the active copy of the registry to a file named guest.sav. The hivetype you want to save to is users, and the hive name is the user SID which is found in hk_users. You would enter the following statement:
restore registry c:\adsm.sys\registry\machine\users\guest c:\guest.sav users S-1-5-21-8533442-1654749355-78804774-1152
For the restore to take effect, you must reboot your machine.
For complete information on the restore registry command, see the documentation for your NT Server Resource Kit.
Syntax
>>-REStore REgistry---+- ENTIRE----------------+--------------->< +- MACHINE-+- CONFIG---+-+ | +- ENUM-----+ | | +- HARDWARE-+ | | +- NETWORK--+ | | +- SAM------+ | | +- SECURITY-+ | | +- SOFTWARE-+ | | '- SYSTEM---' | +- USER-+- CURUSER-+-----+ | '- DEFAULT-' | '- ACTIVATEkey-+- Yes-+--' '- No--'
Parameters
Examples
The following are examples of tasks you might perform using the restore registry command.
Command: rest reg entire
Command: rest reg machine sam
Command: rest reg machine same -activate=y
The restore rsm command restores Removable Storage Manager (RSM) database files that have been backed up to a TSM server. Changes are effective after the server is restarted.
Windows 2000 servers (server, advanced server and datacenter server) may allow many applicatons to share a bulk storage device. On these servers, RSM manages data on removable storage media that exist in a media pool. This data is accessible by media application and media management programs and can be shared and traced across applications.
TSM clients support RSM recovery by creating a backup of the RSM database when running on a Windows 2000 server.
TSM
Syntax
>>-REStore RSm---+----------+---------------------------------->< '- restart-'
Parameters
Examples
Command: res rsm -restart
The restore sysfiles command restores Windows 2000 system and boot files. These files make changes to the registry and should not be restored at the same time as the registry. If you are restoring both the registry and the system and boot files, restore the registry first. System and boot files are part of the system state data and must be restored along with the other components of that data such as the registry, cluster service information and the certificate server database.
Syntax
>>-REStore SYSFiles---+-----------+---------------------------->< '- options--'
Parameters
Examples
Command: res sysf
The restore sysvol command restores a Windows 2000 system volume. This system object is part of system state data and must be restored with other components of that data such as the registry, system files and the certificate server database.
Syntax
>>-REStore SYSVol---+-----------+------------------------------>< '- options--'
Parameters
Examples
Command: res sysv
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".
Note: | An error will occur if you attempt to retrieve a file whose name is the same
as the short name of an existing file. For example, if you attempt to
retrieve a file you specifically named abcdef~1.doc
into the same directory where a file named abcdefghijk.doc
exists, the retrieve will fail because the Windows operating system equates
the file named abcdefghijk.doc to a short name of
abcdef~1.doc. The retrieve function treats this
as a duplicate file.
If this error should occur, perform any of the following actions to correct it:
|
If you are using client version 3.1.0.5 or later, the machine name is part of the file name. Therefore, if you archive files on one machine and you want to retrieve them to another machine, you must specify a destination. This is true even if you are retrieving to the same physical machine, but the machine has a new name. For example, to retrieve the c:\doc\h2.doc file to its original directory on the machine, named star, you would enter:
dsmc retrieve c:\doc\h2.doc \\star\c$\
To retrieve the file to star which has now been renamed meteor, you would enter:
dsmc retrieve c:\doc\h2.doc \\meteor\c$\
You could also enter:
dsmc retrieve c:\doc\h2.doc \\star\c$\
This example is valid because if the machine name is not included in the specification, the local machine is assumed (meteor, in this case).
Syntax
>>-RETrieve---+-----------+-------------------------------------> '- options--' >-----+- sourcefilespec----------------+------------------------> '- {filespacename}sourcefilespec-' >-----+----------------------+--------------------------------->< '- destinationfilespec-'
Parameters
For information about common options you can use with the retrieve command, see Chapter 8, "Setting Common Options".
Note: | If you include filespacename, do not include a drive letter in the file specification. |
Use the file space name if the drive label name has changed, or if you are retrieving files archived from another node with drive label names that are different from yours.
Note: | You must specify a mixed or lowercase NTFS file space name enclosed in quotes and braces. For example, {"NTFSDrive"}. If TSM is running in loop mode, then either single quotes or double quotes are valid. For example: {"NTFSDrive"} and {'NTFSDrive'} are both valid. If TSM is running in batch mode, only single quotes are valid. The single quotes requirement is a restriction of the operating system. |
If the destination drive does not exist, end the file specification either with a directory delimiter (\) or a file name. Otherwise, TSM assumes the last name is a file name and tries to repeatedly overwrite the file as each file is retrieved.
Examples
The following are examples of tasks you might perform using the retrieve command.
Command: ret c:\devel\projecta\budget.fin
Command: ret c:\devel\projecta\*.c
Command: ret {winnt}\devel\projecta\*.c
Command: ret c:\devel\*
Command: ret {abc}\proj\*.*
Command: ret c:\devel\projecta\*.c c:\newdevel\projectn\
Command: ret c:\project\* -pick
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+Break, restart the machine, or turn off the machine to end it.
Note: | You cannot enter this command in interactive mode. |
Syntax
>>-SCHedule---+-----------+------------------------------------>< '- options--'
Parameters
Examples
The following is an example of a task you might perform using the schedule command.
Command: dsmc sch -password=notell
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 c:\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--'
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: sel c:\devel\proja.dev
Command: sel c:\devel\proj*.*
Command: sel c:\devel\proj* c:\planning\*.fin
The set access command gives users at other nodes access to your backup versions or archived copies. You can give another user access to a specific file , multiple files , or all files 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----------------+-----> '- Backup--' '- {filespacename}filespec-' >----- node---+-------+---+-----------------+------------------>< '- 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 d:\test\, use file spec d:\test\*\*.
To specify all files in a named directory, enter c:\proj\* on the command line. To specify all files in all directories off of the root directory, enter d:\*\* on the command line. Enter d:\* on one set access command and d:\*\* on another if you want another user to have complete access to your file space. The first d:\* gives access to all subdirectories and all files off of the root directory.
Use the file space name if the drive label name has changed.
Note: If you include filespacename, do not include a drive letter in the file specification.
Examples
The following are examples of tasks you might perform using the set access command:
Command: set access backup c:\devel\proja\*.c node_2
Command: set access archive c:\devel\* node_3
Command: set ac b {project}\*\* *bldgb
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