home *** CD-ROM | disk | FTP | other *** search
/ com!online 2002 April / comcd0402.iso / vollver / adabas / f_0001 / misc / netvault.txt next >
Encoding:
Text File  |  1999-02-22  |  2.7 KB  |  79 lines

  1. @echo off
  2. rem
  3. rem NetVault_Adabas_PrePost    Pre- and Post-Script templates
  4. rem                for NetVault-Adabas D coupling
  5.  
  6. rem     Software AG        1996-05-03
  7.  
  8. rem To use these templates, perform the following steps:
  9. rem 1. Make a copy of this file and in it set the variables
  10. rem    a) DBROOT to the ADABAS installation directory
  11. rem       (not needed if the system-wide setting is correct),
  12. rem    b) SERVERDB to the name of your database, and
  13. rem    c) NV_DIR to the NetVault installation directory.
  14. rem 2. For each variant of saves you use for this database,
  15. rem    copy this DB-specific file and set the variables
  16. rem    a) ACTION ('SAVEDATA', 'SAVELOG', 'SAVEPAGES') and
  17. rem    b) MEDIUM (e.g. 'EXTERN_D', 'EXTERN_L').
  18. rem 3. Make two extracts of each of these DB- and action-
  19. rem    specific copies:
  20. rem    a) the "Common Variables" and the "PreScript",
  21. rem    b) the "Common Variables" and the "PostScript",
  22. rem    store them as '.bat' files in the 'scripts' subdirectory
  23. rem    of your NetVault installation, they are the pre-
  24. rem    and post-scripts for BACKUP.
  25. rem 4. Make a copy of the pre-script and change 'xbackup' to
  26. rem    'xrestore', this is the RESTORE pre-script.
  27. rem    You do not need a restore post-script.
  28. rem 5. Use CONTROL (menu item "Backup" -> "Media Manager")
  29. rem    to define the media (set in step 2):
  30. rem    the NetVault pipe name 'XYZ' corresponds to the
  31. rem    ADABAS device name '\\.\Pipe\XYZ', device type is 'P'.
  32. rem 6. Administer NetVault to associate the pipe names
  33. rem    with the pre- and post-scripts.
  34. rem These steps must be executed for each database you want to
  35. rem save using NetVault.
  36.  
  37.  
  38. rem    Conventions:
  39. rem DBROOT, SERVERDB: standard Adabas semantics
  40. rem ACTION    see CONTROL / xbackup manual
  41. rem MEDIUM    must start 'EXTERN', optional two more chars
  42. rem %1        NetVault job number
  43. rem %2 = pipe name    must be defined in CONTROL and NetVault
  44.  
  45. rem =================================
  46. rem    Common Variables
  47.  
  48. rem set DBROOT=E:\ADABAS
  49.  
  50. set SERVERDB=SAVETEST
  51. set NV_DIR=E:\NETVAULT
  52. set ACTION=SAVEDATA
  53. set MEDIUM=EXTERN_D
  54.  
  55. set XB_PROT=%DBROOT%\wrk\%SERVERDB%\xbackup.%1.prt
  56.  
  57. rem =================================
  58. rem    PreScript
  59.  
  60. start cmd /c "%DBROOT%\bin\xbackup -d %SERVERDB% -a %ACTION% -m %MEDIUM% -f \\.\Pipe\%2 > %XB_PROT%"
  61.  
  62. rem =================================
  63. rem    PostScript
  64.  
  65. %SYSTEMROOT%\system32\find "finished successfully" %XB_PROT%  > NUL
  66. if not errorlevel 1 goto :good
  67.  
  68. rem No 'ok' message in protocol - produce error info
  69. echo "No ADABAS success info for job %1 to pipe %2"
  70. %NV_DIR%\bin\joberr %1 9
  71. goto :finish
  72.  
  73. :good
  74. echo "ADABAS was successful for job %1 to pipe %2"
  75.  
  76. :finish
  77.  
  78. rem =================================
  79.