home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: SysTools / SysTools.zip / backres.zip / BKPEXIT.CMD < prev    next >
OS/2 REXX Batch file  |  1997-07-28  |  3KB  |  57 lines

  1. /* Rexx */
  2. /***************************************************************************/
  3. /* Warp Server Backup/Restore Backup User Exit                             */
  4. /*                                                                         */
  5. /*      Copyright  1995  IBM Corp.                                         */
  6. /*-------------------------------------------------------------------------*/
  7. /* Parameters passed:                                                      */
  8. /*   Complete         = 0 at the start of a backup                         */
  9. /*                    = 1 at the end of a backup                           */
  10. /*                                                                         */
  11. /*   BkMethod         = Name of the Backup Method used in the backup       */
  12. /*                                                                         */
  13. /*   BkpSet           = Name of the Backup Set being backed up to          */
  14. /*                                                                         */
  15. /*   Incremental      = 0 for a full backup                                */
  16. /*                    = 1 for an incremental backup                        */
  17. /*                                                                         */
  18. /*   Manual           = 0 for a scheduled backup                           */
  19. /*                    = 1 for a manual backup                              */
  20. /***************************************************************************/
  21. Parse arg Complete' <'BkMethod'> <'BkpSet'>' Incremental Manual
  22. /*-------------------------------------------------------------------------*/
  23. /* Check the Complete flag to determine whether this is the beginning or   */
  24. /* end of a backup                                                         */
  25. /*-------------------------------------------------------------------------*/
  26. If Complete = 0 Then Do
  27.    /*----------------------------------------------------------------------*/
  28.    /* We're at the beginning of a backup, so now's the time to shut down   */
  29.    /* any programs which require exclusive access to files.                */
  30.    /*----------------------------------------------------------------------*/
  31.    /*----------------------------------------------------------------------*/
  32.    /* We can check the Backup Method (BkMethod) or Backup Set (BkpSet) to  */
  33.    /* determine what applications need to be shut down.                    */
  34.    /*----------------------------------------------------------------------*/
  35.    Select
  36.       When BkMethod = "Database" Then Do
  37.       End
  38.       When BkMethod = "Server" Then Do
  39.       End
  40.       Otherwise
  41.    End /* endselect */
  42. End /* enddo */
  43. Else Do
  44.    /*----------------------------------------------------------------------*/
  45.    /* The backup has finished, so now's the time to start up the programs  */
  46.    /* we shut down at the beginning of the backup                          */
  47.    /*----------------------------------------------------------------------*/
  48.    Select
  49.       When BkMethod = "Database" Then Do
  50.       End
  51.       When BkMethod = "Server" Then Do
  52.       End
  53.       Otherwise
  54.    End /* endselect */
  55. End
  56. return 0
  57.