You need information about your server machine to rebuild its replacement. You also need information about client node machines to rebuild or restore them. Follow this procedure to specify that information and store it in the server database:
Server Machine
Issue the DEFINE MACHINE command. with ADSMSERVER=YES. For example, to define machine MACH22 in building 021, 2nd floor, in room 2929, with a priority of 1, enter:
define machine tsm1 adsmserver=yes priority=1
Client Machines
Issue the DEFINE MACHINE command. For example, to define machine MACH22 in building 021, 2nd floor, in room 2929, with a priority of 1, enter:
define machine mach22 building=021 floor=2 room=2929 priority=1
Issue the DEFINE MACHNODEASSOCIATION command. Use this association information to identify client nodes on machines that were destroyed. You should restore the file spaces associated with these nodes. For example, to associate node CAMPBELL with machine MACH22, enter:
define machnodeassociation mach22 campbell
To query machine definitions, issue the QUERY MACHINE command. See the example, in Client Recovery Scenario.
The following partial output is from a query on an AIX client machine.
+--------------------------------------------------------------------------------+ |--1 Host Name: mach22 with 256 MB Memory Card | |--- 256 MB Memory Card | |--- | |--4 Operating System: AIX Version 4 Release 3 | |--- | |--- Hardware Address: 10:00:5x:a8:6a:46 | +--------------------------------------------------------------------------------+
Specify characteristics and recovery instructions one line at a time with separate INSERT MACHINE commands:
insert machine mach22 1 characteristics="Host Name: mach22 with 256 MB Memory Card" insert machine mach22 2 characteristics="Operating System: AIX Version 4 Release 3"
insert machine mach22 1 - recoveryinstructions="Recover this machine for accounts receivable dept."
To help automate the adding of client machine information, a sample VBScript command procedure named machchar.vbs is shipped with DRM. The following example shows how to use a local program to add machine characteristics or recovery instructions:
+--------------------------------------------------------------------------------+ | echo "devices" > clientinfo.txt | | lsdev -C | sort -d -f >> clientinfo.txt | | echo "logical volumes by volume group" >> clientinfo.txt | | lsvg -o | lsvg -i -l >> clientinfo.txt | | echo "file systems" >> clientinfo.txt | | df >> clientinfo.txt | +--------------------------------------------------------------------------------+
Figure 88. Example of VBScript Command Procedure to Insert Machine Characteristics
+--------------------------------------------------------------------------------+
|'*************************************************************************** |
|' Tivoli Disaster Recovery Manager for Windows NT/2000 Sample Script |
|' |
|' Read machine characteristics from an input file and build an output file |
|' that is a TSM macro. The TSM macro contains statements which are |
|' TSM commands to insert client machine information into the ADSM server |
|' database. The TSM macro is used with the TSM administrative client. |
|' |
|' Invoke with: |
|' cscript machchar.vbs machinename inputmachinefilename outputmacrofilename |
|' where: |
|' machinename is the name of a machine that has previously |
|' been defined to the TSM server with the |
|' DEFINE MACHINE command |
|' inputmachinefilename is the name of the input file which contains |
|' the client machine characteristics. This file |
|' would typically be built on the client machine |
|' then the file would be transferred to the |
|' Windows machine where the TSM Administrative |
|' client is installed. |
|' outputmacrofilename is the name of the output file in an existing |
|' directory which will be the TSM macro. The |
|' TSM macro will consist of a series of commands |
|' to insert machine characteristics into the TSM |
|' server database. For example: |
|' |
|' INSERT MACHINE mch1 n characteristics='xxx...' |
|' |
|' where: |
|' n represents the sequence number |
|' this line will have in the |
|' TSM server database |
|' 'xxx...' represents a single line from |
|' the input file |
|' |
|' NOTE: The maximum length of a line of machine |
|' characteristics is 1024 |
|' |
|' Example usage: |
|' cscript machchar.vbs mch1 c:\client1\clientinfo.txt c:\client1\clientinfo.mac |
|'*************************************************************************** |
|Dim args |
|Dim MACHINENAME, INFILE, OUTFILE |
|dim fso |
|dim fo, fi |
|dim SEQUENCE |
|Dim CRLF |
+--------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------+
|CRLF = Chr(13) & Chr(10) |
|Const ForReading = 1, ForWriting = 2 |
| |
|'*************************************************************************** |
|' Get input arguments: MACHINENAME =machinename |
|' INFILE =inputmachinefilename |
|' OUTFILE =outputmacrofilename |
|'*************************************************************************** |
| |
|set args = Wscript.Arguments |
| |
|If args.Count < 3 Then |
| Wscript.Echo _ |
| "usage: cscript machchar.vbs machinename inputmachinefilename outputmacrofilename" &a|
| "example: cscript machchar.vbs mch1 c:\client1\clientinfo.txt c:\client1\clientin|
| Wscript.Quit(1) |
|Else |
| MACHINENAME = args.Item(0) |
| INFILE = args.Item(1) |
| OUTFILE = args.Item(2) |
|End if |
| |
|Set fso = CreateObject("Scripting.FileSystemObject") |
| |
|'*************************************************************************** |
|' Create the TSM macro file. |
|'*************************************************************************** |
| |
|Set fo = fso.OpenTextFile(OUTFILE, ForWriting, True) |
| |
|Wscript.Echo "Creating TSM macro file: " & OUTFILE |
| |
|'*************************************************************************** |
|' Place a TSM command in the TSM macro to delete any existing machine |
|' characteristics for this machine from the TSM server database. |
|'*************************************************************************** |
| |
|fo.WriteLine "delete machine " & MACHINENAME & " type=characteristics" |
| |
|'*************************************************************************** |
|' Read a line from the input machine characteristics file, add the TSM |
|' command to insert the line of machine characteristics into the TSM server |
|' database, and write the result to the output TSM macro. |
|'*************************************************************************** |
+--------------------------------------------------------------------------------+
+--------------------------------------------------------------------------------+
|SEQUENCE = 1 |
| |
|Set fi = fso.OpenTextFile(INFILE, ForReading, False) |
| |
|Do While fi.AtEndOfStream <> True |
| |
| INLINE = fi.ReadLine |
| fo.WriteLine "insert machine " & MACHINENAME & " " & SEQUENCE & " char='" & INLINE &a|
| SEQUENCE = SEQUENCE + 1 |
| |
|Loop |
| |
|'*************************************************************************** |
|' Close the files. |
|'*************************************************************************** |
| |
|fo.Close |
|fi.Close |
+--------------------------------------------------------------------------------+
The machchar.vbs VBScript command procedure is run:
cscript machchar.vbs acctsrecv clientinfo.txt clientinfo.mac
Then the macro is run to load the data into the database.
> dsmadmc -id=xxx -pw=xxx macro clientinfo.mac
You can view your machine characteristics by issuing the QUERY MACHINE command with FORMAT=CHARACTERISTICS parameter.