IBM Tivoli Storage Manager Extended Edition, Version 7.1

Specifying information about your server and client node machines

You need information about your server machine to rebuild its replacement. You also need information about client node machines to rebuild or restore them.

About this task

Tip: The plan file that DRM generates is a template that contains information, including commands for recovering the database, that might not apply to your replacement systems or to your particular recovery scenario. To modify the plan or to store additional instructions that you will need during recovery from an actual disaster, use the RECOVERY.INSTRUCTIONS stanzas. Enter your site-specific information in the stanzas when you first create the plan file or after you test it.

Use the following procedure to specify information about server and client machines and to store it in the server database:

Procedure

  1. Specify server machine information by issuing 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 the following command:
    define machine tsm1 adsmserver=yes priority=1
  2. Specify the client node location and business priority by issuing 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
  3. Associate one or more client nodes with a machine by issuing 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
  4. To query machine definitions, issue the QUERY MACHINE command. See the example, in Client recovery scenario.
  5. To add machine characteristics and recovery instructions to the database, issue the INSERT MACHINE command. You must first query the operating system to identify the characteristics for your client machine.

    AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems You can add the information manually or use an awk script. A sample program is shipped with DRM.

    Windows operating systems You can add the information manually or use a Microsoft VBScript command procedure. A sample program is shipped with DRM.

    AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems
    • Add information manually:
      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:
      • To save the first line (Host Name: mach22 with 256 MB Memory Card) as line 1 and to save the fourth line (Operating System: AIX Version 4 Release 3) as line 2 for machine MACH22, issue the following 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"
      • To specify recovery instructions for your client machine, issue the following command:
        insert machine mach22 1 -
          recoveryinstructions="Recover this machine for accounts
           receivable dept."
    • AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems Add Information Using an Awk Script

      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:

      1. The output from the AIX commands lsdev, lsvg, and df is written to the file clientinfo.txt on the AIX client machine that backed up data to the server. These commands list the devices, logical volumes by volume group, and file systems.
      2. AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems The file, clientinfo.txt, is processed by the awk script, which builds a macro of INSERT MACHINE commands (one command for each line in the file).
      3. Run the macro to load the data into the database.
      4. From an AIX prompt, issue the following commands:
          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
        AIX operating systems HP-UX operating systems Linux operating systems Oracle Solaris operating systems The following figure is an example procedure named machchar to add machine characteristics. The machchar.awk.smp script is shipped with DRM and is located in the /opt/tivoli/tsm/server/bin directory.
        # 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   {
               }
      5. The machchar.awk script is then run from an AIX prompt as follows:

        AIX operating systems HP-UX operating systems
        awk -f machchar.awk -v machine=acctrcv clientinfo.txt > 
           clientinfo.mac
        Linux operating systems Oracle Solaris operating systems
        nawk -f machchar.awk -v machine=acctrcv clientinfo.txt > clientinfo.mac
      6. To add the machine characteristics, start an administrative client and run the macro. For example:
        > 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.
      7. To specify recovery instructions for your client machine, use this same awk script process but with the RECOVERYINSTRUCTIONS parameter.
    Windows operating systems
    • Add information manually:
      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:
      • To save the first line (Host Name: mach22 with 256 MB Memory Card) as line 1 and to save the fourth line (Operating System: AIX Version 4 Release 3) as line 2 for machine MACH22, issue the following 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"
      • To specify recovery instructions for your client machine, issue the following command:
        insert machine mach22 1 -
          recoveryinstructions="Recover this machine for accounts
           receivable dept."
    • Windows operating systems Add Information Using a Microsoft VBScript Command Procedure

      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:

      1. The file, clientinfo.txt, from the AIX client machine is transferred to a Windows machine that has an administrative command-line client installed. The file is then processed by the a sample VBScript command procedure, which builds a macro of INSERT commands (one command for each line in the file). The following screens show an example of a procedure named machchar.vbs that is used 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" & 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 
        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.
      2. To add the machine characteristics, start the administrative client and run the macro. For example:
        > dsmadmc -id=xxx -pw=xxx macro clientinfo.mac

        You can view your machine characteristics by issuing the QUERY MACHINE command with FORMAT=CHARACTERISTICS parameter.

      3. To specify recovery instructions for your client machine, you can use a similar VBScript command procedure but with the RECOVERYINSTRUCTIONS parameter.


Feedback