You need information about your server machine to rebuild its replacement. You also need information about client node machines to rebuild or restore them.
Use the following procedure to specify information about server and client machines and to store it in the server database:
define machine tsm1 adsmserver=yes priority=1
define machine mach22 building=021 floor=2 room=2929 priority=1
define machnodeassociation mach22 campbell
You can add the information manually or use an awk script. A sample program is shipped with DRM.
You can add the information manually or use a Microsoft VBScript command procedure. A sample program is shipped with DRM.
--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 awk script named machchar.awk.smp 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
# Read machine characteristics from a file and build Tivoli Storage
# Manager macro commands to insert the information into the machine
#characteristics table.
# Invoke with:
# awk -f machchar.awk -v machine=acctrcv filewithinfo
BEGIN {
print "delete machine "machine" type=characteri"
}
{
print "insert machine "machine" "NR" characteri=\""$0"\""
}
END {
}
awk -f machchar.awk -v machine=acctrcv clientinfo.txt >
clientinfo.mac
nawk -f machchar.awk -v machine=acctrcv clientinfo.txt > clientinfo.mac
> dsmadmc -id=xxx -pw=xxx -se=xxx macro clientinfo.mac
You
can view your machine characteristics by issuing the QUERY MACHINE
command with FORMAT=CHARACTERISTICS parameter.--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:
'***************************************************************************
' 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" & CRLF & _
"example: cscript machchar.vbs mch1 c:\client1\clientinfo.txt
c:\client1\clientinfo.mac"
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 &"'"
SEQUENCE = SEQUENCE + 1
Loop
'***************************************************************************
' Close the files.
'***************************************************************************
fo.Close
fi.Close
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.