Your SlideShare is downloading. ×
myBRMS
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

myBRMS

3,842
views

Published on

Backup, Recovery and Media Configuration Tips and Techniques

Backup, Recovery and Media Configuration Tips and Techniques

Published in: Technology, Business

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,842
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
92
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. BRMS Implementation and Configuration NotesPrepared for Baker Distributing on 06/24/2011by Thomas and Victoria Wolfe Page 1 of 60
  • 2. BRMS Implementation and Configuration NotesHousekeeping (STRMNTBRM command)......................................................................................................... 4 Significant Parameters .................................................................................................................................. 5 Remove Media Information (RMVMEDI) ............................................................................................... 5 Remove Log Entries (RMVLOGE) .......................................................................................................... 5 Expired Media Listing (PRTEXPMED) ................................................................................................... 5 Recovery Reports Listing (PRTRCYRPT) ............................................................................................... 5 Reorganize BRMS database (RGZBRMDB) ........................................................................................... 5Media Management .......................................................................................................................................... 6 Adding (Registering) Media with BRMS ..................................................................................................... 6 Enrolling Media ........................................................................................................................................ 7 Work with Media Library Status (WRKMLBSTS) command ..................................................................... 8 Verifying BRMS Logical and Physical Databases ....................................................................................... 8 Work with Media (WRKMEDBRM) command........................................................................................... 9 Example of creating pick list(s) to unload media library........................................................................ 10 Example of creating pick list(s) to load media library............................................................................ 11 Media Networking Entries .......................................................................................................................... 11 BAKER – Production Partition............................................................................................................... 11 TEST – Development Partition............................................................................................................... 12Problem Determination .................................................................................................................................. 12 Display Log (DSPLOGBRM) Command ................................................................................................... 12 Key reports from STRMNTBRM command .............................................................................................. 13 Backup Activity Report .............................................................................................................................. 13 Save Strategy Exceptions Report ................................................................................................................ 13 Recovery Reports ........................................................................................................................................ 13 Centralized Media Audit Report ................................................................................................................. 13 Media Volume, Volume Threshold and Volume Statistic Reports ............................................................ 13Backup Control Groups .................................................................................................................................. 14 Daily Control Group ................................................................................................................................... 14 Security Data (*SAVSECDTA) ............................................................................................................. 14 IBM (*IBM) ............................................................................................................................................ 14 Configuration (*SAVCFG)..................................................................................................................... 14 All User (**ALLUSR) ............................................................................................................................ 14 Document Library Objects (*SAVDLO) ................................................................................................ 14 IFS Objects (*LINK) .............................................................................................................................. 14 Exit Processing (*EXIT) ......................................................................................................................... 15 Client Omit Entries ................................................................................................................................. 15 Attributes................................................................................................................................................. 16 Save While Active (SWA) ...................................................................................................................... 17 Weekly Control Group ................................................................................................................................ 18 System (*SAVSYS) ................................................................................................................................ 18 IBM (*IBM) ............................................................................................................................................ 18 All User (**ALLUSR) ............................................................................................................................ 18 Document Library Objects (*SAVDLO) ................................................................................................ 18 IFS Objects (*LINK) .............................................................................................................................. 18 Attributes................................................................................................................................................. 19 Page 2 of 60
  • 3. BRMS Implementation and Configuration Notes Scheduler Command (RBO) ................................................................................................................... 20 Backup Policy ............................................................................................................................................. 21 System Policy.............................................................................................................................................. 22 Media Policy ............................................................................................................................................... 23 FULL Backup (32 Days) ........................................................................................................................ 23 INCR Backup (21 Days) ......................................................................................................................... 23Recovery Planning .......................................................................................................................................... 24 Summary of BRMS Recovery Operations .................................................................................................. 24 Additional Recovery Considerations .......................................................................................................... 25 Adding steps to recovery report .................................................................................................................. 25 Hardware Management Console (HMC) .................................................................................................... 26 Backup Critical Console Data ................................................................................................................. 27 Running Recovery Reports On Demand..................................................................................................... 27 Example of Volume Summary Report .................................................................................................... 27 Partial Example of Recover System Report................................................................................................ 28Restoring an IFS object .................................................................................................................................. 34 Work with Link Information (WRKLNKBRM) command ........................................................................ 34Installing IBM i Navigator Plug-In................................................................................................................. 37Additional Resources ...................................................................................................................................... 39Appendix 1 - Display Media Library Status (DSPMLBSTS) .......................................................................... 40 Source Code for Model Tables ................................................................................................................... 40 Control Group Model Table – iCTLGRP DDL Script ........................................................................... 40 Media Class Model Table – iMEDCLS DDL Script .............................................................................. 40 Source Code for Command Interface ......................................................................................................... 41 DSPMLBSTS – Display Media Library Status Command Source ........................................................ 41 Source Code for Command Processing Program (CPP) ............................................................................. 42 DSPMLBSTS – Display Media Library Status Command Processing Program ................................... 42 Source Code for Value Choice Programs (VCP) ........................................................................................ 44 DSPMLBSTS2 – Display Media Library Status 2 Value Choice Program............................................ 44 DSPMLBSTS3 – Display Media Library Status 3 Value Choice Program............................................ 46Appendix 2 – Check In for Media Library (CheckIn) ..................................................................................... 49 Panel Layout (command interface) Examples ............................................................................................ 49 Source Code for Command Interface ......................................................................................................... 50 CheckIn – Check In for Media Library Command Interface .................................................................. 50 Source code for Command Processing Program (CPP).............................................................................. 51 CheckIn – Check In for Media Library Command Processing Program ................................................ 51 CheckIn – Create Object Instructions ......................................................................................................... 56Appendix 3 – Backup Control Group Processing Verification ....................................................................... 57 Daily Save Changes Backup Job Completion RBO Scheduler Entries ...................................................... 57 Monthly Application Backup Job Completion RBO Scheduler Entries ..................................................... 57 Spot Check Backup Completion (Display Log using BRMS) DSPLOGBRM .......................................... 58 Manually Insuring Media is Available for Backup Control Groups........................................................... 59 Work with Media Library Media (WRKMLMBRM) Command ........................................................... 59Additional Resources for Integrating BRMS and IBM Tivoli Storage Manager ............................................ 60 Page 3 of 60
  • 4. BRMS Implementation and Configuration NotesHousekeeping (STRMNTBRM command)You should perform BRMS housekeeping on a daily basis. The BRMS maintenance operation automaticallyperforms BRMS cleanup on your system, updates backup information, and runs reports1. BRMSmaintenance performs these functions: • expires media • removes media information • removes migration information (180 days old) • removes log entries (from beginning entry to within 90 days of current date) • runs cleanup • retrieves volume statistics • audits system media • changes journal receivers • prints expired media report • prints version report • prints media information • prints recovery reportsUse Help/Systems Robot Schedule (RBO) command to review parameters on the Start Maintenance forBRMS (STRMNTBRM) command.1 WRKPCYBRM *SYS command determines location (BRMSOUTQ) for BRMS listings Page 4 of 60
  • 5. BRMS Implementation and Configuration NotesSignificant ParametersRemove Media Information (RMVMEDI)*REUSE = Media content information associated with a volume is not removed from the media contentinventory file until the volume is re-used even though the volume has already expired.Remove Log Entries (RMVLOGE)Remove all types of log entries after ninety (90) days.Expired Media Listing (PRTEXPMED)*YES = Print expired media report.Recovery Reports Listing (PRTRCYRPT)*ALL = Print all recovery reports • *RCYACT - Recovery Activities • *RCYANL – Recovery Analysis • *SAVEXCP - Save Strategy ExceptionsReorganize BRMS database (RGZBRMDB)*YES = Reorganize the BRMS database• This command should not be used by control group *EXIT item as results will be unpredictable.• All object (*ALLOBJ) authority is required to run this command.• This command should be run as an independent job. No other BRMS functions should be active when the STRMNTBRM command is processing. Page 5 of 60
  • 6. BRMS Implementation and Configuration NotesMedia ManagementBRMS makes media management simple by maintaining an inventory of your tape media. It keeps track ofwhat data is backed up on which tape and which tapes have available space. When you run a backup, BRMSselects the tape to use from the available pool of tapes. BRMS prevents a user from accidentally writingover active files or using the wrong tape.Before you can use any tape media with BRMS, you need to add it to the BRMS inventory and initialize it.You can do this using IBM i Navigator Add media wizard (under Media, right-click Tape Volumes andselect Add). You can also use the green-screen BRMS command ADDMEDBRM (Add Media to BRM).Once youve added tape media to the BRMS inventory, you can view the media based on criteria youspecify, such as the volume name, status, media pool, or expiration date. This gives you the capability tomanually expire a tape and make it available for use in the BRMS media inventory.Adding (Registering) Media with BRMSOption 1 media management, option 9 work with media libraries and option 8 work with MLB media. Page 6 of 60
  • 7. BRMS Implementation and Configuration NotesEnrolling Media• Determine Media Class o It is important to have sufficient volumes enrolled in the BRMS scratch pool before performing a save operation. A media scratch pool is a group of available (expired and unused) media that share the same media class. BRMS draws the media it uses for backup and recovery operations from this pool.• Review WRKCLSBRM (*MED) and WRYPCYBRM (*SYS)• Enroll Media Volumes into BRMS (Media Library Device) o Load media into I/O station (if not already done) o Type WRKMLBBRM at the command line to get to the Work with Media Library Media displayPress Enter twiceOption 1 add MLB media2 Do NOT add cleaning tape Only volumes in Inserted status need to be added. Volumes here shown as example only.2 Volumes need only to be initialize *YES and check active files *NO the first time media is added to BRMS Page 7 of 60
  • 8. BRMS Implementation and Configuration NotesWork with Media Library Status (WRKMLBSTS) commandBRMS supports all IBM media libraries (MLB) and has the capability to support third-party library devices.An MLB is an automated media library. You can store a large number of media in an MLB unit and access aspecified volume or volumes for read and write operations. BRMS determines which volumes reside in theMLB, and when needed, issues the proper command to mount the volume.Media libraries enable BRMS to provide the following support:• Perform save and restore operations automatically.• Perform file retrieve automatically.• Migrate infrequently used data from DASD to less expensive storage media while maintaining the ability to access it automatically.• Archive massive amounts of data, such as in image or spooled archive applications.• Provide hardware that new applications can use to manage offline storage.• Manage scratch volumes and volume usage.Verifying BRMS Logical and Physical DatabasesWhen using a tape library with Backup Recovery and Media Services (BRMS) you may need to verify thatthe BRMS database (logical database) and the tape library database (physical database) are identical. TheIBM Redpaper, BRMS and Tape Library: Verifying Your BRMS Logical and Physical Databases areSynchronized can be found at http://www.redbooks.ibm.com/abstracts/tips0291.html?OpenThis functionality can be achieved through with the inclusion of additional products such as the AdvancedFeature of BRMS from IBM or our Display Media Library Status (DSPMLBSTS) command 3which is ourown custom utility that checks synchronization of media library device with BRMS media inventory andreturns a result set to display, spool file, or user-specified output file. Sample usage is shown below:3 Source code provided in Appendix 1. Page 8 of 60
  • 9. BRMS Implementation and Configuration NotesThe DSPMLBSTS command lists information contained in both the BRMS logical database and medialibrary device physical database. It is a helpful quick verification that the media library device containsexpired media and is ready for use. Output Information Includes: • MLB Device Name • MLB Volume Identifier • MLB Library Category o *SHARE400 o *INSERT o *EJECT • BRMS Status • BRMS Expiration Date • BRMS Move Policy • BRMS Location • BRMS Media Class • Label Media Type • BRMS System • BRMS Media Usage Statistics • MLB Write Protect StatusWork with Media (WRKMEDBRM) commandThe Work with Media using BRM (WRKMEDBRM) command manages active, expired or all mediavolumes in the media inventory by creation and expiration date for any or all locations. The followingparameters can be used to tailor this display or printed report. The report that is produced is the Mediareport. The report, if printed, is written to printer file QP1AMM. Page 9 of 60
  • 10. BRMS Implementation and Configuration NotesExample of creating pick list(s) to unload media libraryWRKMEDBRM TYPE(*ACT) LOC(TAPMLB11) SYSNAME(BAKER) 100105 03/18/11 04/23/11 TAPMLB11 *NONE ULTRIUM4 100106 03/19/11 04/24/11 TAPMLB11 *NONE ULTRIUM4 100107 03/20/11 04/25/11 TAPMLB11 *NONE ULTRIUM4 100108 03/21/11 04/26/11 TAPMLB11 *NONE ULTRIUM4 100121 03/22/11 04/27/11 TAPMLB11 *NONE ULTRIUM4 100128 03/23/11 04/28/11 TAPMLB11 *NONE ULTRIUM4 100130 03/24/11 04/29/11 TAPMLB11 *NONE ULTRIUM4 100131 03/25/11 04/30/11 TAPMLB11 *NONE ULTRIUM4 100132 03/26/11 05/01/11 TAPMLB11 *NONE ULTRIUM4 100153 03/27/11 05/02/11 TAPMLB11 *NONE ULTRIUM4 100160 03/28/11 05/03/11 TAPMLB11 *NONE ULTRIUM4WRKMEDBRM TYPE(*ACT) LOC(TAPMLB11) SYSNAME(TEST) 100100 03/18/11 04/22/11 TAPMLB11 *NONE ULTRIUM4 100101 03/19/11 04/23/11 TAPMLB11 *NONE ULTRIUM4 100102 03/20/11 04/24/11 TAPMLB11 *NONE ULTRIUM4 100103 03/21/11 04/25/11 TAPMLB11 *NONE ULTRIUM4 100104 03/22/11 04/26/11 TAPMLB11 *NONE ULTRIUM4 100122 03/23/11 04/27/11 TAPMLB11 *NONE ULTRIUM4 100123 03/24/11 04/28/11 TAPMLB11 *NONE ULTRIUM4 100126 03/25/11 04/29/11 TAPMLB11 *NONE ULTRIUM4 100148 03/26/11 04/30/11 TAPMLB11 *NONE ULTRIUM4 100149 03/27/11 05/01/11 TAPMLB11 *NONE ULTRIUM4 100150 03/28/11 05/02/11 TAPMLB11 *NONE ULTRIUM4 Page 10 of 60
  • 11. BRMS Implementation and Configuration NotesExample of creating pick list(s) to load media libraryWRKMEDBRM TYPE(*EXP) LOC(VAULT) SYSNAME(BAKER) SORT(*EXP) Volume Creation Expiration Move Media Serial Expired Date Date Location Date Class 100125 *YES 02/28/11 03/29/11 VAULT 03/02/11 ULTRIUM4 100127 *YES 03/01/11 03/29/11 VAULT 03/02/11 ULTRIUM4 100133 *YES 03/02/11 03/29/11 VAULT 03/03/11 ULTRIUM4 100134 *YES 03/03/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100135 *YES 03/04/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100136 *YES 03/05/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100137 *YES 03/06/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100138 *YES 03/07/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100139 *YES 03/08/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100140 *YES 03/09/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100141 *YES 03/10/11 03/29/11 VAULT 03/18/11 ULTRIUM4WRKMEDBRM TYPE(*EXP) LOC(VAULT) SYSNAME(TEST) SORT(*EXP) 100109 *YES 03/02/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100110 *YES 03/03/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100111 *YES 03/04/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100112 *YES 03/05/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100113 *YES 03/06/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100114 *YES 03/07/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100115 *YES 03/08/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100116 *YES 03/09/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100117 *YES 03/10/11 03/29/11 VAULT 03/18/11 ULTRIUM4 100192 *YES 02/28/11 03/29/11 VAULT 03/02/11 ULTRIUM4 100197 *YES 03/01/11 03/29/11 VAULT 03/02/11 ULTRIUM4Media Networking EntriesBAKER – Production Partition Page 11 of 60
  • 12. BRMS Implementation and Configuration NotesTEST – Development PartitionProblem DeterminationDisplay Log (DSPLOGBRM) Command• Log of success or failure of BRMS operations and status messages• Shows only BRMS related information – one place to look o First place to start any type of problem determination In conjunction with joblogs, history (QHST) log, and QSYSOPR message queue• Selected information from joblog, history log and QSYSOPR message queue• Sub-selection options of messages displayed: o Media Management o Maintenance o Backup and Recovery o Archive and Retrieval o Security (Functional Usage) o Migration o Time and Date selection o Message severity selection o F9/F10 = All parameters, User and Message Id Selection• F11=Alternate View on Display BRM Log panel provides qualified job information Page 12 of 60
  • 13. BRMS Implementation and Configuration NotesKey reports from STRMNTBRM commandBackup Activity Report• This report identifies libraries and objects that were not saved. Use it to look for errors in your save operation and take action as appropriate.Save Strategy Exceptions Report• Use this report to see which libraries, if any, were not saved, and to help you devise save strategies for them. If the report indicates that BRMS did not save a library already in a control group, you need to investigate why the error occurredRecovery Reports• The STRMNTBRM command can produce any number of the three essential recovery reports (Recovery Analysis, Volume Summary, and ASP Recovery). If desired, you can make this request from the Print recovery reports parameterCentralized Media Audit Report• The STRMNTBRM command produces this report for each system in a network. BRMS does not generate this report if you have a single-system environment.Media Volume, Volume Threshold and Volume Statistic Reports• The STRMNTBRM command generates these reports automatically. These reports show volumes that have equalled or exceeded the usage or read/write threshold limits that are set for the media class. Check these error thresholds and take appropriate action to replace volumes with errors. Page 13 of 60
  • 14. BRMS Implementation and Configuration NotesBackup Control GroupsThe Work with Control Groups using BRM (WRKCTLGBRM) command manages all backup control groupsin BRMS. Whenever possible, the hierarchical structure of BRMS defaults control group values to media,move, backup and system polices for consistency.Daily Control GroupPerforms save-while-active (users are allowed to be signed on the system) best practices system-wide dailyincremental-cummulative backup:Security Data (*SAVSECDTA)This entry saves user profile (password changes, etc.) and other system security information.IBM (*IBM)This entry saves all system licensed program product (LPP) information in the QSYS file system.Configuration (*SAVCFG)This entry saves an image (bit copy) that can be used for rapid (and complete only) system restore to thesame hardware.All User (**ALLUSR)This entry saves all customer (primarily non-IBM) information in the QSYS file system.Document Library Objects (*SAVDLO)This entry saves all customer (primarily non-IBM) information in the DLO file system.IFS Objects (*LINK)This entry saves both customer and IBM information in the integrated file system. Page 14 of 60
  • 15. BRMS Implementation and Configuration NotesExit Processing (*EXIT)These four (4) entries start and stop two (2) TCP/IP servers so that some objects can be saved that arenormally exclusively allocated.• *HTTP - IBM i Power by Apache servers (http://tinyurl.com/3vztfan)• *IBMHELP – IBM i automated remote (phone home) support (http://tinyurl.com/3qocybk)Client Omit EntriesThese entries can be managed through IBM i Navigator, System i Director or 5250 (API4) interfaces:CTLGRP OMTLIB OMTOBJ OMTTYP _ Select OOCGNAME as CTLGRP,BAK_DAILY BSAVEFILES *ALL *ALL OOLIBNAME as OMTLIB,BAK_DAILY FASTFAX *ALL *ALL OOOBJNAME as OMTOBJ, OOTYPE as OMTTYPBAK_DAILY FTASTIC *ALL *ALL From qusrbrm/qa1aooBAK_DAILY QMPGDATA *ALL *ALLBAK_DAILY QUSRDIRDB QGLDLOCK *USRSPCBAK_DAILY RBTCONLIB RBCMANAGER *DTAARABAK_DAILY RBTCONLIB RBC603DA *DTAARABAK_DAILY RBTSYSLIB RSL550DA *DTAARABAK_DAILY ROBOTLIB RBT542DA *DTAARABAK_DAILY ROBOTLIB RBT635 *DTAARABAK_DAILY ROBOTLIB RBT660 *DTAARABAK_DAILY ROBOTLIB RBT695DA *DTAARA******** End of data ********4 http://tinyurl.com/3weybu6 Page 15 of 60
  • 16. BRMS Implementation and Configuration NotesAttributes Page 16 of 60
  • 17. BRMS Implementation and Configuration NotesSave While Active (SWA)The save-while-active (SWA) feature allows users to resume activity after save processingreaches a certain point. i5/OS refers to this point as the synchronization checkpoint. By using thesave-while-active feature, you can reduce application downtime and increase user access toselected data or applications.• *LIB - This value indicates that library objects can be saved while in use by another job. Because all of the library objects reach checkpoint together, BRMS saves them in a consistent state in relationship to each other. If you specify multiple libraries in the control group, BRMS performs the checkpoint processing individually for the objects within each specified library. For example, to save LIBA and LIBB, the system performs two separate SAVLIB commands and establishes two checkpoints.• *SYNCLIB - This value also specifies that objects in a library can be saved while in use by another job. However, in this case, all of the objects and all of the libraries reach a checkpoint together. BRMS saves them in a consistent state in relationship to one another.To use the save-while-active feature with a save that does not use journaling or commitmentcontrol, you need to prevent user access until BRMS reaches the synchronization point. Once thesystem reaches the checkpoint, the system releases the exclusive locks on the library, and userscan resume normal activity. Meanwhile, BRMS continues to save the data. Page 17 of 60
  • 18. BRMS Implementation and Configuration NotesWeekly Control GroupPerforms restricted-state (users are NOT allowed to be signed on the system) best practices system-wideweekly full backup:System (*SAVSYS)This entry saves full system information including licensed internal code (LIC) and user profiles.IBM (*IBM)This entry saves all system licensed program product (LPP) information in the QSYS file system.All User (**ALLUSR)This entry saves all customer (primarily non-IBM) information in the QSYS file system.Document Library Objects (*SAVDLO)This entry saves all customer (primarily non-IBM) information in the DLO file system. IFS Objects (*LINK)This entry saves both customer and IBM information in the integrated file system. Page 18 of 60
  • 19. BRMS Implementation and Configuration NotesAttributes Page 19 of 60
  • 20. BRMS Implementation and Configuration NotesScheduler Command (RBO)Control groups consist of groups of libraries, objects, folders, spooled files, and other types of datathat share common characteristics or that you want grouped together for backup purposes.Whereas policies determine how data is processed, control groups determine, by their content,which data to process. They also specify what kind of backup you want BRMS to perform, such asfull, incremental, or cumulative-incremental. In addition, control groups specify which days thedata will be processed, and the order in which the processing occurs.Control groups usually refer to, and work with, related policies. You can set control groupattributes to override policy decisions.Though you cannot create control groups specifically for a recovery job, BRMS does efficientlyrecover data by control groups. Page 20 of 60
  • 21. BRMS Implementation and Configuration NotesBackup Policy Page 21 of 60
  • 22. BRMS Implementation and Configuration Notes Specifies how to perform backups. You can define weekly backup activities, types of incremental backup, and the level at which you want to save media information. One backup policy governs all backup operations. You can define or change these operations at the control group level.System Policy• Very similar to a set of system values, unless other policies or controls are in place, system policy parameters determine the policy defaults for many of your BRMS operations. Page 22 of 60
  • 23. BRMS Implementation and Configuration NotesMedia PolicyFULL Backup (32 Days)INCR Backup (21 Days) Page 23 of 60
  • 24. BRMS Implementation and Configuration NotesRecovery PlanningBRMS produces a complete system recovery report that guides you through an entire system recovery. Thereport lets you know exactly which media volumes are needed to recover your system.5 Use the report inconjunction with i5/OS Backup and Recovery (SC41-5304-08).• BRMS recovery provides for the orderly retrieval of lost or damaged data. Its most important feature is a series of recovery reports that take you, step-by-step, through the recovery of your system. These reports not only contain restore instructions, but also indicate which volumes the system requires for the recovery. With BRMS, you can restore your entire system, or selected items such as control groups, libraries, objects, folders, auxiliary storage pools (ASPs), spooled files, or integrated file system links.Summary of BRMS Recovery Operations5 See section on example recover system report below for more detail. Page 24 of 60
  • 25. BRMS Implementation and Configuration NotesAdditional Recovery ConsiderationsWhen you back your system up using BRMS, Information about each backup item is recorded in the savehistory within BRMS. The information in the save history is used to create a recovery report, which stepsyou through a full system i (iSeries/AS/400) recovery. Because of the critical nature of this BRMS recoveryreport, it is vital that you take a few precautions to ensure that this information is current and accessiblewhen you need it.You cannot use your recovery report alone to recover your system. You must also have the systeminformation for recovery to be successful.BRMS recovery report does NOT tell you how to configure your disk setup, partition profiles, or recoverLicensed Internal Code. Your recovery is only as good as your backup, So be sure to test your backup andrecovery strategy anytime you change it by doing a full system recovery. Test your recoveries at a disasterrecovery hot site, or by using a test system. It should be obvious, but I will advise you anyway NOT to useyour production server for testing.You should send the BRMS recovery reports off your system. In a disaster, your System i (iSeries/AS/400)will not be available, and you will not have access to the output (print) queue containing the latest recoveryreport.• Print your recovery report every time you do a backup and send it offsite with media and/or Email a copy to another server not located in the same facility as your system. See recovery report automation checkpoint.Adding steps to recovery reportStarting at V5R4M0, it is now possible to add additional user recovery steps to the BRMS recovery report.User recovery information can be included in the recovery report by adding records containing theinformation to the appropriate members of file QO1AUSRRCY in library QUSRBRM. Add records tomember PROLOG to include user recovery information to the prolog information in the report.• Add records to members STEP nnn to include user recovery information to specific steps in the report, where nnn is the step number as it appears on the report. Up to 92 bytes of user recovery information can be added to each record. There is no limit to the number of records.• User recovery information is added to the report following the BRMS information and before any saved items in the step. This information will be clearly highlighted on the report as user recovery information.• Each record is read sequentially from the file member, starting from the first record and ending with the last record, and will be added to the report in the same order as read. Each record will be placed on the report following the last printed line starting in column 8.• The user is responsible for all spacing, positioning and translation of the recovery information in each record.• The user is responsible for assuring the accuracy of the user recovery information.• The step numbers in the report differ depending on the value of the Option (OPTION) parameter and the content of the recovery. If the OPTION or content is changed, the names of the members in file Page 25 of 60
  • 26. BRMS Implementation and Configuration Notes QO1AUSRRCY may need to be renamed accordingly. The step numbers should be consistent if the report type and saved item content are consistent.• No exception is signaled if user recovery information is requested but no records are found in the members.• When using STRRCYBRM USRRCYINF(*ADD) FROMSYS(), the user steps from the target system will not be included in the recovery report unless the additional steps have being added to the QO1AUSRRCY file in library QUSRBRM. on the system where the recovery report is being run on.• STRRCYBRM ACTION(*RESTORE) USRRCYINF(*ADD) will fail with BRM132EHardware Management Console (HMC)If you are using the Hardware Management Console (HMC) for eServer, You must back up theHMC. This is in addition to using the BRMS *SYSTEM option to obtain a complete back up of yoursystem. In disaster recovery, a systems administrator can use an appropriate recovery CD andthe Critical Console Data backup to get the HMC back to the state it was in prior to the failure.It is important to maintain a current Critical Console Data (CCD) back up to use in recovering theHMC after loss of a disk drive or HMC. Whenever you go to a new version of the HMC code, oruse a Recovery CD to update the HMC, you should create a new CCD backup immediately. Thesame is true if you update HMC code between releases using the corrective service filesdownloadable from the web,If you use Recovery media to update your Licensed Internal Code to a new release level, ensurethat you make a new CCD back up after the upgrade process. A CCD back up created at V4R3will not work on a system upgraded to V4R5 using a Recovery CD.• Run the initial backup (two copies) and send the DVDs offsite• Use the HMC scheduler to run the HMC backup daily or weekly on another DVD so that it keep overwriting the same DVD until there is a change in hardware or the code is updated or upgraded. Page 26 of 60
  • 27. BRMS Implementation and Configuration NotesBackup Critical Console DataThis task backs up all configuration data of the HMC to a DVD-RAM media, capturing any and all changes made to the HMCafter initial installation from the recovery CD.The following data is included in the backup DVD-RAM media:• User configuration.• User preferences, including each user’s home directory.• HMC configuration files that record the following customizing: o TCP/IP o Rexec/ssh facility setting o Remote virtual terminal setting o Time zone setting• HMC log files located in the /var/log directory.• Service functions settings, such as Inventory Scout, Service Agent, and Service Focal Point.• Partition profile data backup. The partition profile data must be backed up before performing the “Backup Critical Console Data” task. The task simply backs up files in the /var/hsc/profiles/MT-MDL*S/N directory, if they already exist.This task should be performed each time configuration changes are made to the system or the HMC. You might even want toconsider scheduling a regular Backup Critical Console Data task.Notes:• The backup DVD-RAM created using this task is only used for the system recovery situation. When updating from an HMC software level to another, the backup DVD-RAM media is not used.• The DVD-RAM media has two sides. Each side should be considered as a separate media.• Each side of a DVD-RAM media must be formatted beforehand.• Each side of a DVD-RAM media can hold only one generation of the backup; if you performed this task multiple times, only the backup taken the last time would be preserved.Running Recovery Reports On DemandExample of Volume Summary Report Page 27 of 60
  • 28. BRMS Implementation and Configuration NotesPartial Example of Recover System Report**************************************************************************************************** Selection Criteria Option . . . . . . . . . . . . . : *SYSTEM Start date and time . . . . . . : 3/28/11 *AVAIL Ending date and time . . . . . . : *END *AVAIL Use save files . . . . . . . . . : *YES Use TSM . . . . . . . . . . . . : *YES Use duplicate media . . . . . . : *NO User recovery information . . . : *NO Libraries to omit . . . . . . . : *DELETE System name . . . . . . . . . . : BAKER Volume location . . . . . . . . : *ALL******************************************************************************************************************************************************************************************************** The following report is to be used in conjunction with the "Backup and Recovery" book, SC41-5304, to assist with recovery from failures.**************************************************************************************************** When recovering the system, refer to the section on "Recovering after a Complete Loss" under chapter "Selecting the Right Recovery Strategy" in the "Backup and Recovery" book, and the details shown below to determine which recovery steps should be taken and the media needed for each step. If you have logical files, and based-on physical and logical files are in different libraries, refer to the section on "Restoring Logical Files" in the "Backup and Recovery" book for important restore considerations before proceeding with recovery. If you use journaling refer to the section on "Restoring Journals and Journal Receivers" in the "Backup and Recovery" book for important restore considerations before proceeding with recovery. You can use the Start date/time, Stop date/time and Duration fields to record the time it takes to test or perform your recovery. A value of *SYSBAS for ASP Name refers to saved items backed up from the system (1) or basic user (2-32) auxiliary storage pools. A value of *ADSM for Volume Identifier refers to saved items backed up to Tivoli Storage Manager (TSM) servers. If the recovery includes saved items saved to TSM servers or saved from auxiliary disk pool devices, these saved items will be recovered after the IPL when these resources become available.****************************************************************************************************__ STEP 001 : Recover Licensed Internal Code Start date/time __________________ Stop date/time __________________ Duration _________________ You must recover the Licensed Internal Code. To do so, you must follow the procedures for "Recovering the Licensed Internal Code" as detailed in the "Backup and Recovery" book. Use the media listed for the *SAVSYS saved item to recover the Licensed Internal Code. An alternate installation device must be configured using Dedicated Service Tools (DST) when the device is connected to a bus other than the system bus, or the device is attached using a fiber channel. The Licensed Internal Code distribution media will be required in addition to the *SAVSYS saved item to recover the system. ----- Attention --------------------------------------------------- __ Use option 2 when recovering to a different system, or recovering a system with user auxiliary storage pools, or recovering to the same system with a different release. __ Use option 3 when recovering to the same system at the same release or recovering a logical partition to another logical partition. --------------------------------------------------------------------- ----- Attention --------------------------------------------------- If you are using a media library device, you will need to use either standalone, automatic or manual mode, or use the device move media function to load the media volume containing the *SAVSYS saved item. Refer to the device documentation if you are not familiar with these device modes or functions. --------------------------------------------------------------------- --- Objects --- Saved Save ----- ASP ------ Save Save Not Sequence Control Volume Page 28 of 60
  • 29. BRMS Implementation and Configuration Notes Item Type Name Number Date Time Saved Saved Number Group Identifier ---------- ------- ---------- ----- -------- -------- ------- ------- --------- ---------- ----------__ *SAVSYS *FULL *SYSBAS 00001 3/29/11 21:33:04 0 0 1 *SYSTEM 100152****************************************************************************************************__ STEP 002 : Recover Operating System Start date/time __________________ Stop date/time __________________ Duration _________________ You must recover the Operating System. To do so, you must follow the procedures for "Restoring the Operating System" as detailed in the "Backup and Recovery" book. Use the media listed for the *SAVSYS saved item to recover the Operating System. ----- Attention --------------------------------------------------- To prevent the recovery from failing, change the following system values to the new settings when you reach the "Define and Change the System at IPL" task during operating system recovery. Record the current setting for use after the recovery is complete. System value Current setting New setting QALWOBJRST _______________ *ALL QFRCCVNRST _______________ 0 QINACTIV _______________ *NONE QIPLTYPE _______________ 2 QJOBMSGQFL _______________ *PRTWRAP QJOBMSGQMX _______________ 30 (minimum, 64 recommended) QLMTDEVSSN _______________ 0 QLMTSECOFR _______________ 0 QMAXSIGN _______________ *NOMAX QPFRADJ _______________ 2 QPWDEXPITV _______________ *NOMAX QSCANFSCTL _______________ *NOPOSTRST QVFYOBJRST _______________ 1 --------------------------------------------------------------------- --- Objects --- Saved Save ----- ASP ------ Save Save Not Sequence Control Volume Item Type Name Number Date Time Saved Saved Number Group Identifier ---------- ------- ---------- ----- -------- -------- ------- ------- --------- ---------- ----------__ *SAVSYS *FULL *SYSBAS 00001 3/29/11 21:33:04 0 0 1 *SYSTEM 100152****************************************************************************************************__ STEP 003 : Set Up Standalone or Media Library Devices for Recovery Start date/time __________________ Stop date/time __________________ Duration _________________ If you are using a media library device and automatic configuration is enabled, you can use the media library device to automate recovery at this time if it is not a 3494 Media Library using TCP/IP. ----- Attention --------------------------------------------------- If you are using a 3494 Media Library with TCP/IP communications for recovery, continue to use the media library as a standalone device. --------------------------------------------------------------------- ----- Attention --------------------------------------------------- If you are using a 3494 Media Library using APPC communications for recovery, you must configure and setup the communications necessary to control the cartridge loader. --------------------------------------------------------------------- For recovery using the device as a media library (TAPMLBxx): __ A. Unload the media volume containing the *SAVSYS saved item from the device. __ B. Load all the volumes needed for the recovery (including the *SAVSYS volume) in the media library. __ C. Set the media library device for library operations. Refer to the device documentation if you are not familiar with enabling the device for library operations. __ D. Verify the status of the media library device is VARIED ON. To do so, type the following command and press "Enter". WRKMLBSTS __ E. Use Option 4=Allocate resource to set the current allocation of the media library resources to ALLOCATED. For recovery using the device as a standalone device (TAPxx): __ A. Retrieve all volumes needed for recovery. If you are using an automatic cartridge loader, insert the volumes in the loader in the required sequence. __ B. Type the following command and press "Enter". WRKDEVD DEVD(*TAP) __ C. Use Option 8=Work with status to verify the status of the Page 29 of 60
  • 30. BRMS Implementation and Configuration Notes device you are using is VARIED ON.****************************************************************************************************__ STEP 004 : Recover the BRMS Product and Associated Libraries Start date/time __________________ Stop date/time __________________ Duration _________________ The BRMS product and associated libraries must be recovered before you can use the product to perform other recovery operations. Change the QSYSOPR message queue to prevent messages not related to the recovery from interrupting the recovery process. To do so, type the following command and press "Enter". CHGMSGQ MSGQ(QSYSOPR) DLVRY(*NOTIFY) SEV(99) Choose from the configured devices, the standalone devices or media libraries you intend to use for the recoveries which follow. For tape devices, run the following command. WRKCFGSTS CFGTYPE(*DEV) CFGD(*TAP) For media library devices, run the following command. WRKCFGSTS CFGTYPE(*DEV) CFGD(*TAPMLB) Type the command choice and press "Enter". Recover the libraries listed below, specifying the saved-item, the name of the standalone device or media library you are using, and the volume identifiers and sequence numbers listed. For type *FULL, run the following command. RSTLIB SAVLIB(saved-item) DEV(device-name) VOL(volume-identifier) SEQNBR(sequence-number) For type *CUML or *INCR, run the following command. RSTOBJ OBJ(*ALL) SAVLIB(saved-item) DEV(device-name) VOL(volume-identifier) SEQNBR(sequence-number) MBROPT(*ALL) Type the command choice and press "Enter". ----- Attention --------------------------------------------------- If you did not save access paths when you saved the QUSRBRM library, these access paths will be rebuilt when the library is restored. Verify rebuild of the access paths for files in library QUSRBRM is complete before proceeding to the next recovery step. To do so, type the following command and press "Enter". EDTRBDAP --------------------------------------------------------------------- --- Objects --- Saved Save ----- ASP ------ Save Save Not Sequence Control Volume Item Type Name Number Date Time Saved Saved Number Group Identifier ---------- ------- ---------- ----- -------- -------- ------- ------- --------- ---------- ----------__ QBRM *FULL *SYSBAS 00001 3/29/11 21:44:13 1,294 0 38 *SYSTEM 100152__ QMSE *FULL *SYSBAS 00001 3/29/11 21:44:13 7 0 63 *SYSTEM 100152__ Q1ABRMSF *FULL *SYSBAS 00001 3/29/11 21:44:13 1 0 82 *SYSTEM 100152__ Q1ABRMSF01 *FULL *SYSBAS 00001 3/29/11 21:44:13 1 0 83 *SYSTEM 100152__ QUSRBRM *FULL *SYSBAS 00001 3/29/11 21:50:32 219 0 102 *SYSTEM 100152****************************************************************************************************__ STEP 005 : Recover BRMS Related Media Information Start date/time __________________ Stop date/time __________________ Duration _________________ You must recover this information for the BRMS product to accurately guide you through the remaining recovery steps. Recover the libraries listed below, specifying the saved-item, the name of the standalone device or media library you are using, and the volume identifiers and sequence numbers listed. To do so, type the following command and press "Enter". RSTOBJ OBJ(*ALL) SAVLIB(saved-item) DEV(device-name) VOL(volume-identifier) SEQNBR(sequence-number) MBROPT(*ALL) --- Objects --- Saved Save ----- ASP ------ Save Save Not Sequence Control Volume Item Type Name Number Date Time Saved Saved Number Group Identifier ---------- ------- ---------- ----- -------- -------- ------- ------- --------- ---------- ----------__ QUSRBRM *QBRM *SYSBAS 00001 3/29/11 22:14:49 15 0 105 *SYSTEM 100152****************************************************************************************************__ STEP 006 : Initialize BRMS Functional Authority Information Start date/time __________________ Stop date/time __________________ Duration _________________ You must perform this step to initialize BRMS functional authorities. Register all BRMS resources which use functional authority. To do so, type the following command and press "Enter". INZBRM OPTION(*SETAUT) Assign the QSECOFR user profile administrative functional authority to the BRMS resources. Page 30 of 60
  • 31. BRMS Implementation and Configuration Notes To do so, type the following command and press "Enter". SETUSRBRM USER(QSECOFR) USAGE(*ADMIN)****************************************************************************************************__ STEP 007 : Update System Name in BRMS Media Information Start date/time __________________ Stop date/time __________________ Duration _________________ BRMS uses the network identifier and default local location name from the system network attributes to assign a system owner to saved items and the media containing those saved items. The network attributes for the saved system are: Local network ID . . . . . . . . . . .: APPN Default local location . . . . . . . .: BAKER Display the network attributes of the recovery system. To do so, type the following command and press "Enter". DSPNETA Record the network attributes of the recovery system: Local network ID . . . . . . . . . . .: ____________________ Default local location . . . . . . . .: ____________________ If the local network identifier or default local location for the saved system are different from the recovery system and the recovery system is correct, you must change the system owner of the saved items and media in the BRMS history to match the network attributes. To do so, type the following command and press "Enter". INZBRM OPTION(*CHGSYSNAM) PRVSYSNAM(APPN.S10602TM ) NEWSYSNAM(*LCL) ----- Attention --------------------------------------------------- Be sure to specify a fully qualified name for the saved system using "local-network-id.default-local-location" format. --------------------------------------------------------------------- If the local network identifier or default local location for the Select the saved item(s) listed below from the "Select Recovery Items" display and press "Enter" to recover these saved items. Recovery of these saved items will require the volumes listed on the report or duplicate volumes. --- Objects --- Saved Save ----- ASP ------ Save Save Not Sequence Control Volume Item Type Name Number Date Time Saved Saved Number Group Identifier ---------- ------- ---------- ----- -------- -------- ------- ------- --------- ---------- ----------__ *SAVCFG *FULL *SYSBAS 00001 3/29/11 21:33:04 60 0 36 *SYSTEM 100152****************************************************************************************************__ STEP 012 : Recover Required System Libraries Start date/time __________________ Stop date/time __________________ Duration _________________ You must restore specific system libraries before you can use BRMS to perform other recovery steps. If the "Select Recovery Items" display is not shown and you are performing a complete system restore, run the following command. STRRCYBRM OPTION(*RESUME) Otherwise, run the following command. STRRCYBRM OPTION(*SYSTEM) ACTION(*RESTORE) Type the command choice and press "Enter". Select the saved item(s) listed below from the "Select Recovery Items" display and press "Enter" to recover these saved items. Recovery of these saved items will require the volumes listed on the report or duplicate volumes. --- Objects --- Saved Save ----- ASP ------ Save Save Not Sequence Control Volume Item Type Name Number Date Time Saved Saved Number Group Identifier ---------- ------- ---------- ----- -------- -------- ------- ------- --------- ---------- ----------__ QSYS2 *FULL *SYSBAS 00001 3/29/11 21:48:27 213 0 85 *SYSTEM 100152__ QGPL *FULL *SYSBAS 00001 3/29/11 21:48:27 1,359 0 86 *SYSTEM 100152__ QUSRSYS *FULL *SYSBAS 00001 3/29/11 21:48:27 3,676 0 87 *SYSTEM 100152****************************************************************************************************__ STEP 013 : Reset BRMS Device and Media Library Information Start date/time __________________ Stop date/time __________________ Duration _________________ You must reset the BRMS device and media library information. ----- Attention --------------------------------------------------- If you are using a 3494 Media Library with TCP/IP communications for recovery, you can now configure the media library for automated cartridge loading. Configure the 3494 Media Library before you reset the BRMS device and media library information. --------------------------------------------------------------------- Clear and initialize the BRMS device and media library information with the tape and media library devices currently configured on the system. Page 31 of 60
  • 32. BRMS Implementation and Configuration Notes To do so, press F12 to return to a command prompt, then type the following command and press "Enter". INZBRM OPTION(*DEVICE) ----- Attention --------------------------------------------------- INZBRM OPTION(*DEVICE) resets some device information to the BRMS supplied defaults. --------------------------------------------------------------------- Review the BRMS device information. To do so, type the following command and press "Enter". WRKDEVBRM Update the BRMS device information with any changes necessary before continuing with the recovery.****************************************************************************************************__ STEP 014 : Recover All Remaining System and User Data Start date/time __________________ Stop date/time __________________ Duration _________________ You may now select to recover all of the data on your system. Otherwise, skip to the next recovery step. To do so, type the following command and press "Enter". STRRCYBRM OPTION(*RESUME) ----- Attention --------------------------------------------------- Press F9 on the Select Recovery Items display to go to the Restore Command Defaults display. __ Ensure the tape device name or media library device name is correct for the Device prompt. __ Ensure *SAVLIB is specified for the Restore to library prompt. __ Ensure *SAVASP is specified for the Auxiliary storage pool prompt. Press "Enter" to return to the Select Recovery Items display. --------------------------------------------------------------------- Some system specific lines omitted Review the joblog or output from your recovery processing to ensure all recovery steps completed successfully. Restore authorities to objects. To do so, type the following command and press "Enter". RSTAUT USRPRF(*ALL) To restore authority information saved by BRMS for basic user auxiliary pools (2-32), run the following command. RSTAUTBRM USRASP(*ALLUSR) Type the command choice and press "Enter".***************************************************************************************************_ STEP 024 : Verify System Information Start date/time __________________ Stop date/time __________________ Duration _________________ You should verify your system information. If you use either of the following commands after the save, additional reports are created which can be used to verify the system information. STRRCYBRM PRTSYSINF(*YES) STRMNTBRM PRTSYSINF(*YES) If you are using distribution media to restore your system, then you should use these reports to re-create the system information as as detailed in the "Backup and Recovery" book.****************************************************************************************************__ STEP 025 : Apply PTFs Start date/time __________________ Stop date/time __________________ Duration _________________ Re-apply PTFs which were applied after the last save of system data.****************************************************************************************************__ STEP 026 : Reset System Values Start date/time __________________ Stop date/time __________________ Duration _________________ Use the commands and recorded values in step "Recover Operating System" to change the system values to the original setting or to a new value that meets your desired policy.****************************************************************************************************__ STEP 027 : Print Job Log Page 32 of 60
  • 33. BRMS Implementation and Configuration Notes Start date/time __________________ Stop date/time __________________ Duration _________________ You should print the joblog. To do so, type the following command and press "Enter". DSPJOBLOG JOB(*) OUTPUT(*PRINT) Review the joblog or output from your recovery processing to ensure all recovery steps completed successfully.****************************************************************************************************__ STEP 028 : Perform IPL Start date/time __________________ Stop date/time __________________ Duration _________________ Return system to normal mode and IPL. To do so, type the following command and press "Enter". PWRDWNSYS OPTION(*IMMED) RESTART(*YES) * * * * * E N D O F L I S T I N G * * * * * Page 33 of 60
  • 34. BRMS Implementation and Configuration NotesRestoring an IFS objectWork with Link Information (WRKLNKBRM) commandThe Work with Link Information using BRM (WRKLNKBRM) command works with IFS objects saved usingBRMS.• Select recovery dates (and/or optionally select directory to restore from) and Press Enter.• Select directory or sub directory level to restore from with option 9 Page 34 of 60
  • 35. BRMS Implementation and Configuration Notes• Select volume and date to restore from using option 7.• Accept default device press F9=Show All Parameters and page down• Enter a new location if desired, otherwise accept default and page down.Note: If you are restoring to a new directory change the Create Parent Directories and Allow ObjectDifferences parameters as shown on the next two panels. Page 35 of 60
  • 36. BRMS Implementation and Configuration Notes• Change the Create Parent Directories parameter to *YES if you are restoring to a new location.• Change the Allow Object Differences parameter.• Press Enter to start the restore.• Use the Work with Link (WRKLNK) command to access restored objects in target directory. Page 36 of 60
  • 37. BRMS Implementation and Configuration NotesInstalling IBM i Navigator Plug-In• Plug-in support provides the capability to integrate (plug-in) custom tools and applications with formally supported Operations Navigator functions.• Enables applications to be accessed and managed as if they were part of the standard Operations Navigator navigation tree of functions.An application must be registered to Operations Navigator as a plug-in. Key IBM-provided plug-insfor v6r1 include:• Advanced Job Scheduler – 5761JS1• Backup, Recovery and Media Services (BRMS) – 5761BR1• Domino for System i - 5761LN1• On-Demand for System – 5761RD1• Performance Tools – 5761PT1• After connecting to the System I, Auto-detection of Plug-Ins is started and a window showing registered plug-ins, if any, is shown. From that list you can select to install none or each registered plug-in. Page 37 of 60
  • 38. BRMS Implementation and Configuration Notes Page 38 of 60
  • 39. BRMS Implementation and Configuration NotesAdditional ResourcesBackup and Recovery; SC41-5304-09 (6.1)Backup and Recovery; SC41-5304-10 (7.1)Backup, Recovery and Media Services; SC41-5345-06 (6.1)Backup, Recovery and Media Services; SC41-5345-07 (7.1)Virtual Tape Redbook; SQ24-7164i5/OS V5R4 Virtual Tape: A Guide to Planning and Implementationhttp://www.redbooks.ibm.com/abstracts/sg247164.htmlBRMS for IBM ihttp://www-03.ibm.com/systems/i/support/brms/index.html?Backup, Recovery and Media Services (BRMS) Overviewhttp://www2.systeminetwork.com/resources/starterkit/chp16/chp16.htmBackup, Recovery and Media Services for OS/400 – A Practical Approachhttp://www.redbooks.ibm.com/abstracts/sg244840.htmlBackup, Recovery and Media Services for i 7.1http://publib.boulder.ibm.com/infocenter/iseries/v7r1m0/topic/brms/sc415345.pdf Page 39 of 60
  • 40. BRMS Implementation and Configuration NotesAppendix 1 - Display Media Library Status (DSPMLBSTS)Source Code for Model TablesControl Group Model Table – iCTLGRP DDL ScriptDrop Table ictlgrp;Create Table ictlgrpR (controlGroup For Column ctlgrp Character (10 ) Not Null, Primary Key ( ctlgrp ) );Label On ictlgrpR (ctlgrp Text Is Control Group);Label On ictlgrpR (ctlgrp Is Control Group);Comment On ictlgrpR (ctlgrp Is Control Group);Label On Table ictlgrpR Is OPNQRYF format for Control Group (BRMS);Comment On Table ictlgrpR Is OPNQRYF format for Control Group (BRMS);Rename Table ictlgrpR To System Name ictlgrp;Media Class Model Table – iMEDCLS DDL ScriptDrop Table imedCls;Create Table imedClsR (mediaClass For Column medCls Character (10 ) Not Null, mediaText For Column medTxt Character (50 ) Not Null With Default , Primary Key ( medCls ) );Label On imedClsR (medCls Text Is Media Class, medTxt Text Is Media Text);Label On imedClsR (medCls Is Media Class, medTxt Is Media Text);Comment On imedClsR (medCls Is Media Class, medTxt Is Media Text);Label On Table imedClsR Is OPNQRYF format for Media Class (BRMS);Comment On Table imedClsR Is OPNQRYF format for Media Class (BRMS);Rename Table imedClsR To System Name imedCls; Page 40 of 60
  • 41. BRMS Implementation and Configuration NotesSource Code for Command InterfaceDSPMLBSTS – Display Media Library Status Command Source Cmd Prompt(Display Media Library Status) Parm Kwd(device) + Type(*name) + Len(10) + Min(1) + Expr(*yes) + Choice(*pgm) + ChoicePgm(dspmlbsts3) + Prompt(Library device) Parm Kwd(output) + Type(*char) + Len( 8) + Min(0) + Dft(*) + Values(* *print *outfile) + Rstd(*yes) + Expr(*yes) + Prompt(Output) Parm Kwd(outfile) + Type(tag1) + Min(0) + PmtCtl(Tag3) + Prompt(File to receive output) Parm Kwd(outmbr) + Type(tag2) + Min(0) + PmtCtl(Tag3) + Prompt(Output member options)Tag1: Qual Type(*Name) + Len(10) Qual Type(*Name) + Len(10) + Dft(*LIBL) + SpcVal((*LIBL *LIBL)) + Prompt(Library)Tag2: Elem Type(*Name) + Len(10) + dft(*first) + spcval((*first *first)) + Prompt(Member to receive output) Elem Type(*Char) + Len(8) + Dft(*replace) + Values(*replace *add) + Rstd(*yes) + Prompt(Replace or add records)Tag3: PmtCtl ctl(output) cond((*EQ *outfile)) nbrtrue(*eq 1) Page 41 of 60
  • 42. BRMS Implementation and Configuration NotesSource Code for Command Processing Program (CPP)DSPMLBSTS – Display Media Library Status Command Processing Program/* ***************************************************************** + Program: Display Media Library Status (DSPMLBSTS) + Author: Thomas Wolfe + Created: 04/27/2001 + + When using a tape library with Backup Recovery and Media Services + (BRMS) for the IBM eServer iSeries Server, you need to ensure that + the BRMS database (logical database) and the tape library database + (physical database) are identical. This Hint & Tip documents two + verification methods: + + ==> http://www.redbooks.ibm.com/abstracts/tips0291.html?Open + + This source code may be freely distributed and modified as long + as the copyright information is not removed or altered. + + Copyright 2011, 400 Squadron Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at: + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific + language governing permissions and limitations under the + License. + + ****************************************************************** + Purpose: BRMS (TSM) media library integration (wrapper) utility. + ****************************************************************** + REVISION HISTORY + + Date Developer Description + ../../.... + ****************************************************************** */Pgm parm(&devNme + &outAtr + &filLib + &mbrOpt)Dcl &devNme *char 10 /* Device name (Required) */Dcl &outAtr *char 8 /* Output attribute */Dcl &filLib *char 20 /* Outfile (Qualified) */Dcl &mbrOpt *char 20 /* Outfile (Elements) */Dcl &errCnt *dec (3 0) /* STD error count field */Dcl &msgId *char 7 /* STD message id */Dcl &msgDta *char 1024 /* STD message data */Dcl &msgFil *char 10 /* STD message file */Dcl &msgLib *char 10 /* STD message library */Copyright (© Ants Software Inc. 2001-2011. All rights reserved.)/* STANDARD (STD) GLOBAL ERROR PROCESSING ROUTINE */ MonMsg Cpf0000 Exec(Goto Oops) ChgVar (&msgDta) + (Retrieving media library status. Please wait) SndPgmMsg MsgId(cpf9898) + Page 42 of 60
  • 43. BRMS Implementation and Configuration Notes MsgDta(&msgDta) + MsgType(*status) + MsgF(qcpfmsg) + Topgmq(*ext) Monmsg cpf0000 DspTapCtg Dev(&devNme) Output(*outfile) Outfile(qtemp/dsptapctg) If ((&outAtr *eq *)) Then(Do) StrQMQry QMQry(dspmlbsts) output(*) + QMForm(dspmlbsts) Datetime(*no) Pagnbr(*no) EndDo If ((&outAtr *eq *PRINT)) Then(Do) OvrPrtF File(qpqxprtf) PageSize(*n 132) Ovrscope(*calllvl) StrQMQry QMQry(dspmlbsts) output(*print) + QMForm(dspmlbsts) Datetime(*no) Pagnbr(*no) EndDo If ((&outAtr *eq *OUTFILE)) Then(Do) StrQMQry QMQry(dspmlbsts) output(*outfile) + QMForm(dspmlbsts) + outfile(%sst(&filLib 11 10)/%sst(&filLib 1 10)) + outmbr((%sst(&mbrOpt 3 10)) + (%sst(&mbrOpt 13 8))) EndDo Goto Exit/* STANDARD (STD) RETRIEVE DIAGNOSTIC MESSAGES ROUTINE */Oops: If ((&errCnt *gt 0)) Then(Goto Exit) Chgvar (&errCnt) (&errCnt + 1) ChgJob Log(4 0 *seclvl) /* Change option to spool joblog */Diag: RcvMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*diag) + MsgF(&msgFil) + SndMsgFLib(&msgLib) MonMsg Cpf0000 If ((&msgId *eq )) Then(Goto Escp) SndPgmMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*diag) + MsgF(&msgLib/&msgFil) + Topgmq(*prv) MonMsg Cpf0000 Goto Diag/* STANDARD (STD) RETRIEVE EXCEPTION MESSAGES ROUTINE */Escp: RcvMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*excp) + MsgF(&msgFil) + SndMsgFLib(&msgLib) MonMsg Cpf0000 SndPgmMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*escape) + MsgF(&msgLib/&msgFil) + Topgmq(*prv) MonMsg Cpf0000 Goto Exit/* STANDARD (STD) PROGRAM TERMINATION AND COMPLETION */Exit: DltOvr *all Monmsg cpf0000 Return EndPgm Page 43 of 60
  • 44. BRMS Implementation and Configuration NotesSource Code for Value Choice Programs (VCP)DSPMLBSTS2 – Display Media Library Status 2 Value Choice Program/*********************************************************************//* Program: Display Media Library Status (DSPMLBSTS2) - VCP *//* Author: Thomas Wolfe *//* Created: 04/27/2001 *//* *//* This source code may be freely distributed and modified as long *//* as the copyright information is not removed or altered. *//* *//* Copyright 2011, 400 Squadron Inc. *//* *//* Licensed under the Apache License, Version 2.0 (the "License"); *//* you may not use this file except in compliance with the License. *//* You may obtain a copy of the License at: *//* *//* http://www.apache.org/licenses/LICENSE-2.0 *//* *//* Unless required by applicable law or agreed to in writing, *//* software distributed under the License is distributed on an *//* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, *//* either express or implied. See the License for the specific *//* language governing permissions and limitations under the *//* License. *//* *//*********************************************************************//* Purpose: BRMS (TSM) media library integration (wrapper) utility. *//*********************************************************************//* REVISION HISTORY *//* *//* Date Developer Description *//* ../../.... *//*********************************************************************/Pgm parm(&devNme + &outAtr + &filLib + &mbrOpt)Dcl &devNme *char 10 /* Device name (Required) */Dcl &outAtr *char 8 /* Output attribute */Dcl &filLib *char 20 /* Outfile (Qualified) */Dcl &mbrOpt *char 20 /* Outfile (Elements) */Dcl &isValid *char 1 (1) /* is Valid! */Dcl &errFlg *char 1 /* Error flag */Dcl &errCnt *dec (3 0) /* STD error count field */Dcl &msgId *char 7 /* STD message id */Dcl &msgDta *char 1024 /* STD message data */Dcl &msgFil *char 10 /* STD message file */Dcl &msgLib *char 10 /* STD message library */Dclf qusrbrm/qa1amd /* Database file */Copyright (‘© Ants Software Inc. 2001-2011. All rights reserved.’)/* STANDARD (STD) GLOBAL ERROR PROCESSING ROUTINE */ MonMsg Cpf0000 Exec(Goto Oops) AddLiblE qusrbrm *last MonMsg cpf0000 ChkObj (&devNme) *devd MonMsg cpf0000 Exec(ChgVar (&isValid) (0)) If ((&isValid *eq 0)) Then(Do) ChgVar (&msgDta) + (0000 Device name *bcat &devNme *tcat is not valid.) SndPgmMsg MsgId(cpd0006) + Page 44 of 60
  • 45. BRMS Implementation and Configuration Notes MsgDta(&msgDta) + MsgType(*diag) + MsgF(qcpfmsg) ChgVar (&errFlg) (1) EndDo Else Cmd(Do) OvrDbf qa1amd qusrbrm/qa1amd share(*yes) ovrscope(*calllvl) OpnQryf qa1amd + qryslt(mdName *eq " *cat &devNme *cat " )Read: RcvF MonMsg cpf0000 Exec(Do) ChgVar (&msgDta) + (0000 Device name *bcat &devNme *tcat is not valid.) SndPgmMsg MsgId(cpd0006) + MsgDta(&msgDta) + MsgType(*diag) + MsgF(qcpfmsg) ChgVar (&errFlg) (1) EndDo CloF qa1amd MonMsg Cpf0000 DltOvr *all MonMsg Cpf0000 EndDo If ((&outAtr *ne *) *and + (&outAtr *ne *print) *and + (&outAtr *ne *outfile)) Then(Do) ChgVar (&msgDta) + (0000 Output type *bcat &outAtr *tcat is not valid.) SndPgmMsg MsgId(cpd0006) + MsgDta(&msgDta) + MsgType(*diag) + MsgF(qcpfmsg) ChgVar (&errFlg) (1) EndDo If ((&outAtr *eq *OUTFILE)) Then(Do) If ((%sst(&filLib 1 10) *eq )) Then(Do) ChgVar (&msgDta) + (0000 Output file is not valid.) SndPgmMsg MsgId(cpd0006) + MsgDta(&msgDta) + MsgType(*diag) + MsgF(qcpfmsg) ChgVar (&errFlg) (1) EndDo If ((%sst(&filLib 1 10) *eq DSPMLBSTS) *AND + (%sst(&filLib 11 10) *eq QTEMP)) Then(Do) ChgVar (&msgDta) + (0000 Combination of output file and library not valid.) SndPgmMsg MsgId(cpd0006) + MsgDta(&msgDta) + MsgType(*diag) + MsgF(qcpfmsg) ChgVar (&errFlg) (1) EndDo EndDo RmvLiblE qusrbrm MonMsg cpf0000 If ((&errFlg *eq 1)) Then(Do) SndPgmMsg MsgId(cpf0002) + MsgDta(&msgDta) + MsgType(*escape) + MsgF(qcpfmsg) MonMsg cpf0000 EndDo Goto Exit Page 45 of 60
  • 46. BRMS Implementation and Configuration Notes/* STANDARD (STD) RETRIEVE DIAGNOSTIC MESSAGES ROUTINE */Oops: If ((&errCnt *gt 0)) Then(Goto Exit) Chgvar (&errCnt) (&errCnt + 1) ChgJob Log(4 0 *seclvl) /* Change option to spool joblog */Diag: RcvMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*diag) + MsgF(&msgFil) + SndMsgFLib(&msgLib) MonMsg Cpf0000 If ((&msgId *eq )) Then(Goto Escp) SndPgmMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*diag) + MsgF(&msgLib/&msgFil) + Topgmq(*prv) MonMsg Cpf0000 Goto Diag/* STANDARD (STD) RETRIEVE EXCEPTION MESSAGES ROUTINE */Escp: RcvMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*excp) + MsgF(&msgFil) + SndMsgFLib(&msgLib) MonMsg Cpf0000 SndPgmMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*escape) + MsgF(&msgLib/&msgFil) + Topgmq(*prv) MonMsg Cpf0000 Goto Exit/* STANDARD (STD) PROGRAM TERMINATION AND COMPLETION */Exit: Return EndPgmDSPMLBSTS3 – Display Media Library Status 3 Value Choice Program/*********************************************************************//* Program: Display Media Library Status (DSPMLBSTS3) - CVP *//* Author: Thomas Wolfe *//* Created: 04/27/2001 *//* *//* This source code may be freely distributed and modified as long *//* as the copyright information is not removed or altered. *//* *//* Copyright 2011, 400 Squadron Inc. *//* *//* Licensed under the Apache License, Version 2.0 (the "License"); *//* you may not use this file except in compliance with the License. *//* You may obtain a copy of the License at: *//* *//* http://www.apache.org/licenses/LICENSE-2.0 *//* *//* Unless required by applicable law or agreed to in writing, *//* software distributed under the License is distributed on an *//* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, *//* either express or implied. See the License for the specific *//* language governing permissions and limitations under the *//* License. *//* *//*********************************************************************//* Purpose: BRMS (TSM) media library integration (wrapper) utility. */ Page 46 of 60
  • 47. BRMS Implementation and Configuration Notes/*********************************************************************//* REVISION HISTORY *//* *//* Date Developer Description *//* ../../.... *//*********************************************************************/Pgm parm(&prm001 + &prm002)Dcl &prm001 *char 21 /* Parameter 1 */Dcl &prm002 *char 2000 /* Parameter 2 */Dcl &strPos *dec (3 0) (3) /* String position */Dcl &howMny *dec (3 0) /* How many entries? */Dcl &errCnt *dec (3 0) /* STD error count field */Dcl &msgId *char 7 /* STD message id */Dcl &msgDta *char 1024 /* STD message data */Dcl &msgFil *char 10 /* STD message file */Dcl &msgLib *char 10 /* STD message library */Dclf qusrbrm/qa1amd /* Database file */Copyright (© 400 Squadron Inc. 2001-2011. All rights reserved.)/* STANDARD (STD) GLOBAL ERROR PROCESSING ROUTINE */ MonMsg Cpf0000 Exec(Goto Oops) If ((%sst(&prm001 1 10) *eq DSPMLBSTS) *OR + (%sst(&prm001 1 10) *eq STRBKUOVR)) Then(Do) If ((%sst(&prm001 11 10) *eq DEVICE )) Then(Do) If ((%sst(&prm001 21 1) *eq C )) Then(Do) chgvar (&prm002) (Name, F4=List more values) EndDo Else Cmd(do) Chgvar (&strPos) (3)Read: RcvF MonMsg cpf0000 exec(Do) ChgVar (%bin(&prm002 1 2)) (&howMny) Goto Exit EndDo ChgVar (%bin(&prm002 &strPos 2)) (10) ChgVar (&strPos) (&strPos + 2) ChgVar (%sst(&prm002 &strPos 10)) (&MDNAME) ChgVar (&strPos) (&strPos + 10) ChgVar (&howMny) (&howMny + 1) GoTo Read EndDo EndDo EndDo Goto Exit/* STANDARD (STD) RETRIEVE DIAGNOSTIC MESSAGES ROUTINE */Oops: If ((&errCnt *gt 0)) Then(Goto Exit) Chgvar (&errCnt) (&errCnt + 1) ChgJob Log(4 0 *seclvl) /* Change option to spool joblog */Diag: RcvMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*diag) + MsgF(&msgFil) + SndMsgFLib(&msgLib) MonMsg Cpf0000 If ((&msgId *eq )) Then(Goto Escp) SndPgmMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*diag) + MsgF(&msgLib/&msgFil) + Topgmq(*prv) MonMsg Cpf0000 Goto Diag/* STANDARD (STD) RETRIEVE EXCEPTION MESSAGES ROUTINE */Escp: RcvMsg MsgId(&msgId) + Page 47 of 60
  • 48. BRMS Implementation and Configuration Notes MsgDta(&msgDta) + MsgType(*excp) + MsgF(&msgFil) + SndMsgFLib(&msgLib) MonMsg Cpf0000 SndPgmMsg MsgId(&msgId) + MsgDta(&msgDta) + MsgType(*escape) + MsgF(&msgLib/&msgFil) + Topgmq(*prv) MonMsg Cpf0000 Goto Exit/* STANDARD (STD) PROGRAM TERMINATION AND COMPLETION */Exit: DltOvr *all Monmsg cpf0000 Return EndPgm Page 48 of 60
  • 49. BRMS Implementation and Configuration NotesAppendix 2 – Check In for Media Library (CheckIn)Panel Layout (command interface) Exampleshttp://mysystemi.com/checkin.html Page 49 of 60
  • 50. BRMS Implementation and Configuration NotesSource Code for Command InterfaceCheckIn – Check In for Media Library Command Interface Cmd Prompt(Check In Library Media) Parm Kwd(dev) + Type(*name) + Len(10) + Min(0) + Dft(TAPMLB01) + Expr(*yes) + Choice(*pgm) + ChoicePgm(checkin_03) + Prompt(Device name) Parm Kwd(medcls) + Type(*name) + Len(10) + Dft(ULTRIUM4) + Min(0) + Expr(*yes) + Choice(*pgm) + ChoicePgm(checkin_04) + Prompt(Media class) Parm Kwd(mode) + Type(*CHAR) + Len(10) + Values(*ALL *INSERT) + Rstd(*yes) + Dft(*ALL) + Min(0) + Expr(*yes) + Pmtctl(*pmtrqs) + Prompt(Processing mode) Parm Kwd(unlloc) + Type(*NAME) + Len(10) + Dft(VAULT) + Min(0) + Expr(*yes) + Choice(*pgm) + ChoicePgm(checkin_05) + Pmtctl(*pmtrqs) + Prompt(Unload Location) Page 50 of 60
  • 51. BRMS Implementation and Configuration NotesSource code for Command Processing Program (CPP)CheckIn – Check In for Media Library Command Processing Program // * ================================================================ * // * Program name...: CHECKIN * // * Purpose........: BRMS Media Library Synchronization Program * // * Programmers....: Thomas Wolfe * // * Victoria Wolfe * // * Create Date....: June 15, 2001 * // * * // * Copyright 2011, 400 Squadron Inc. * // * * // * Licensed under the Apache License, Version 2.0 (the "License"); * // * you may not use this file except in compliance with the License. * // * You may obtain a copy of the License at: * // * * // * http://www.apache.org/licenses/LICENSE-2.0 * // * * // * Unless required by applicable law or agreed to in writing, * // * software distributed under the License is distributed on an * // * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * // * either express or implied. See the License for the specific * // * language governing permissions and limitations under the * // * License. * // * * // * Maintenance Log: * // * * // * PGMR SEARCH DATE DESC. OF CHANGE * // * ---------- ----- ---------- --------------------------------- * // * * // * ================================================================ *h datfmt(*ISO) timfmt(*HMS) debug(*yes) option(*srcstmt : *nodebugio)h actgrp(*caller) dftactgrp(*no) bnddir( QC2LE: MYSYSTEMI)h Copyright (Copyright © 400 Squadron Inc, 2011.)/COPY QPRTSRC,mySystemi // * ================================================================ * // * Display Tape Cartridge (v5r3) http://tinyurl.com/42p8nvt * // * ================================================================ *d mlbCtg e ds extname( QATAVOF ) inzd mlbCtgDS ds inzd rd001 5i 0d rd002 like(rd001)d rd003 like(rd001)d rd004 like(rd001)d rd005 like(rd001)d rd006 like(rd001)d rd007 like(rd001)d rd008 like(rd001)d rd009 like(rd001)d rd010 like(rd001)d rd011 like(rd001)d rd012 like(rd001)d rd013 like(rd001)d rd014 like(rd001)d rd015 like(rd001)d rd016 like(rd001)d rd017 like(rd001)d rd018 like(rd001)d rd019 like(rd001)d rd020 like(rd001)d rd021 like(rd001)d rd022 like(rd001)d mlbCtgInd 5i 0 dim( 22 )d overlay (mlbCtgDS)d brmMed e ds extname( QA1AMM ) Page 51 of 60
  • 52. BRMS Implementation and Configuration Notes // * ================================================================ * // * SQL pre-compiler default values http://tinyurl.com/3swbmoa * // * ================================================================ *c/Exec SQL + Set Option commit = *NONE, closqlcsr = *ENDMOD, datfmt = *ISOc/End-Exec // * ================================================================ * // * Program status data structure http://tinyurl.com/3luzeue * // * ================================================================ *d PgmDs sdsd programID *PROCd errdta 91 170d errid 171 174d userId 254 263 // * ================================================================ * // * Program specific variable and data structure definitions * // * ================================================================ *d devNme s 10d medCls s 10d cgyMde s 10d locNme s 10d sysNme s 8d errFlg1 s n inz(*Off)d errFlg2 s n inz(*Off)d volExp s 5s 0 inz( 0 )d volAct s 5s 0 inz( 0 )d edit4 c 0 // * ================================================================ * // * SQL DECLARE CURSOR C1 for Media Library Inventory * // * ================================================================ *c/Exec SQL + Declare c1 Cursor + For Select * + From qtemp/checkin A + Where A.rdlib = :devNme C1: Process DSPTAPCTG + And substring(A.rdmid, 1, 3) <> CLN command (outfile) volumes + And Exists ( + Select 1 that DO EXIST in BRMS + From qusrbrm/qa1amm B + Where A.rdmid = B.tmcvsr ) + For Read Onlyc/End-Execc/Exec SQL + Declare c2 Cursor + For Select A.tmcvsr, + A.tmcvlt, + A.tmcend, + A.tmcexp, + A.tmsyid, + A.tmrgsy, C2: Process BRMS media + A.tmbvol, volumes QA1AMM that DO + A.tmcprv + From qusrbrm/qa1amm A NOT EXIST - DSPTAPCTG + Where A.tmcvlt = :devNme command (outfile) + And A.tmsyid = :sysNme + And NOT Exists ( + Select 1 + From qtemp/checkin B + Where A.tmcvsr = B.rdmid ) + For Read Onlyc/End-Exec // * Entry parameter definition *c *Entry Plist Page 52 of 60
  • 53. BRMS Implementation and Configuration Notesc Parm devNmec Parm medClsc Parm cgyMdec Parm locNme /FREE Monitor; // Global Monitor Error Trap * If deviceNameIsValid( devNme ) And mediaClassIsValid( medCls ) And locationNameIsValid( locNme ); Command parameters Valid? sysNme = %Trim(GetNetAtr( SYSNAME )); // * ================================================================ * // * Retrieve media inventory in media library * // * ================================================================ * message = Retrieving media library inventory from device + %trim(devNme); CallP(e) sndjobmsg(message ); // Job Log Message Entry * command = DSPTAPCTG DEV( + %trim(devNme) + ) CGY(*ALL) + OUTPUT(*OUTFILE) OUTFILE(QTEMP/CHECKIN) + OUTMBR(*FIRST *REPLACE); CallP(e) RunCmd(%trim(command): %len(%trim(command))); Is Display Tape Cartridge If %Error; command SUCCESSFUL? message = Error occured on DSPTAPCTG command + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * Else; // * ================================================================ * // * Update volumes in media library from *INSERT mode (C1) * // * ================================================================ * Exec SQL Open c1; If sqlCod = 0; DoU sqlCod <> 0; ReSet mlbCtg; // Reset column defaults * ReSet mlbCtgDS; // Reset null indicators * Exec SQL Fetch From c1 Into :mlbCtg :mlbCtgInd; If sqlCod = 100; Leave; ElseIf sqlCod <> 0; message = Error on DSPTAPCTG fetch cursor C1 + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * errFlg1 = *On; Leave; EndIf; Exec SQL Select TMCVSR, TMCCLS, TMCEXP, TMCEND, TMTEXT, TMRGSY, TMSYID, TMCVLT, TMCPRV Into :TMCVSR, :TMCCLS, :TMCEXP, :TMCEND, :TMTEXT, :TMRGSY, :TMSYID, :TMCVLT, :TMCPRV From qusrbrm/qa1amm Where TMCVSR = :rdmid; If sqlCod <> 0; Only DSPTAPCTG volumes Iter; that are registered in BRMS Else; If TMCEND = Y; inventory are processed If RDCGY = *INSERT; command = ADDTAPCTG DEV( + %trim(devNme) + ) + CGY(*SHARE400) CTG( + %TRIM(RDMID) + ) CHKVOL(*NO); CallP(e) RunCmd(%trim(command): %len(%trim(command))); If %Error; message = Media + %TRIM(RDMID) + NOT added to device + %trim(devNme) + by + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * Iter; Else; TMTEXT = %trim(sysNme) + : + %trim(tmcvsr) + from + Page 53 of 60
  • 54. BRMS Implementation and Configuration Notes %trim(tmcvlt) + into + %trim(devNme); If TMSYID <> sysNme; %SubSt(TMTEXT: 50: 1) = *; TMSYID = sysNme; TMRGSY = sysNme; EndIf; If TMCVLT <> devNme; TMCPRV = TMCVLT; TMCVLT = devNme; EndIf; Exec SQL Update qusrbrm/qa1amm Set tmsyid = :TMSYID, tmrgsy = :TMRGSY, tmcvlt = :TMCVLT, tmtext = :TMTEXT Where tmcvsr = :RDMID; If sqlCod <> 0; message = Media + %TRIM(RDMID) + NOT updated in BRMS + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * Else; message = %trim(TMTEXT) + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * EndIf; EndIf; EndIf; Else; Iter; EndIf; EndIf; ReSet sqlCod; // Reset SQL indicator * EndDo; Else; message = Error on DSPTAPCTG open cursor C1 + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * errFlg1 = *On; EndIf; Exec SQL Close c1;// * ================================================================ *// * Update volumes that do NOT exist in media library (C2) *// * ================================================================ * Exec SQL Open c2; If sqlCod = 0; DoU sqlCod <> 0; ReSet brmMed; // Reset column defaults * Exec SQL Fetch From c2 Into :tmcvsr, :tmcvlt, :tmcend, :tmcexp, :tmsyid, :tmrgsy, :tmbvol, :tmcprv; If sqlCod = 100; Leave; ElseIf sqlCod <> 0; message = Error on WRKMEDBRM fetch cursor C2 + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * errFlg2 = *On; Leave; EndIf; If tmcvlt = devNme; If tmcprv = ; Change current location of tmcprv = locNme; volumes NOT inside media EndIf; Exec SQL Update qusrbrm/qa1amm library to the unload location Set tmcvlt = :tmcprv, tmcprv = :devNme Where tmcvsr = :tmcvsr; If sqlCod <> 0; Page 54 of 60
  • 55. BRMS Implementation and Configuration Notes message = Media + %TRIM(tmcvsr) + NOT updated in BRMS + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * errFlg2 = *On; Iter; EndIf; EndIf; EndDo; Else; message = Error on WRKMEDBRM open cursor C2 + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * errFlg2 = *On; EndIf;// * ================================================================ *// * Send completion status message to QSYSOPR (QHST) *// * ================================================================ * If Not errFlg1 and NOT errFlg2; message = Media management (BRMS) completed normally + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * ElseIf errFlg1; message = Errors occured updating media in *INSERT mode + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * ElseIf errFlg2; message = Errors occured updating media not in library + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * EndIf;// * ================================================================ *// * Send media library inventory message to QSYSOPR (HST) *// * ================================================================ * Exec SQL Select Cast(Case When (Select 1 From qusrbrm/qa1amm A Where TMCEND = Y Send message to QSYSOPR And TMCVLT = :devNme) = 1 with inventory of active and Then (Select Count(*) From qusrbrm/qa1amm A expired volumes stored inside Where TMCEND = Y media library And TMCVLT = :devNme) Else 0 End As Numeric(5,0)) As volExp, Cast(Case When (Select 1 From qusrbrm/qa1amm A Where TMCEND <> Y And TMCVLT = :devNme) = 1 Then (Select Count(*) From qusrbrm/qa1amm A Where TMCEND <> Y And TMCVLT = :devNme) Else 0 End As Numeric(5,0)) As volAct Into :volExp, :volAct From sysibm/sysdummy1; message = Media volumes ( + %trim(devNme) + ) expired: + %trim(%subst(%editw(volExp: edit4): 2 :4)) + active: + %trim(%subst(%editw(volAct: edit4): 2 :4)) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * EndIf; Else; message = BRMS media management terminated abnormally + in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * EndIf; On-Error *All; message = BRMS media management terminated abnormally + Page 55 of 60
  • 56. BRMS Implementation and Configuration Notes in program + %trim(programId) + .; CallP(e) sndhstmsg(message ); // QSYSOPR Message Entry * EndMon; *InLR = *On; Return; // End of program and return ******************* End of data *************************************************CheckIn – Create Object InstructionsCRTSRVPGM SRVPGM(ZUSRBRM/MYSYSTEMI) EXPORT(*ALL) TEXT(mySystemi: Retrieve System Information tew) BNDDIR(ZUSRBRM/MYSYSTEMI) ALWLIBUPD(*YES) AUT(*USE)CRTPGM PGM(ZUSRBRM/CHECKIN_02) TEXT(CheckIn validity checking program (VCP) tew) BNDSRVPGM(ZUSRBRM/MYSYSTEMI) ACTGRP(*CALLER) ALWLIBUPD(*NO) USRPRF(*OWNER) AUT(*USE) ALWRINZ(*YES)CRTCMD CMD(ZUSRBRM/CHECKIN) PGM(*LIBL/CHECKIN) VLDCKR(*LIBL/CHECKIN_02) HLPPNLGRP(*LIBL/CHECKIN) HLPID(*CMD) PRDLIB(ZUSRBRM) TEXT(‘CHECKIN command Interface tew’) AUT(*USE) ENBGUI(*YES) Page 56 of 60
  • 57. BRMS Implementation and Configuration NotesAppendix 3 – Backup Control Group Processing VerificationDaily Save Changes Backup Job Completion RBO Scheduler EntriesMonthly Application Backup Job Completion RBO Scheduler Entries Page 57 of 60
  • 58. BRMS Implementation and Configuration NotesSpot Check Backup Completion (Display Log using BRMS) DSPLOGBRM Page 58 of 60
  • 59. BRMS Implementation and Configuration NotesManually Insuring Media is Available for Backup Control GroupsWork with Media Library Media (WRKMLMBRM) Command Page 59 of 60
  • 60. BRMS Implementation and Configuration NotesAdditional Resources for Integrating BRMS and IBM Tivoli StorageManagerhttp://www.redbooks.ibm.com/Redbooks.nsf/RedbookAbstracts/SG247031.html Page 60 of 60