Recovery using the RESTOREBEFORE keyword

The RECOVER utility can use an image copy, concurrent copy, or system-level backup that has an RBA or LRSN that is prior to a specified RBA/LRSN, using the RESTOREBEFORE keyword. If you know the log RBA or LRSN that you want to use as the RESTOREBEFORE point, enter it in the RESTOREBEFORE Log RBA/LRSN field. To select the log RBA or LRSN from a list, follow the steps in this topic.

About this task

The RESTOREBEFORE keyword allows the utility to avoid specific image copies, concurrent copies, or system-level backups with matching or more recent RBA or LRSN values. The RECOVER utility applies the log records and restores the object to its current state or the specified TORBA or TOLOGPOINT value.

Procedure

  1. On the Recover Utility Log Options panel, enter Y in the Select RESTOREBEFORE field and press Enter.
  2. On the Point-In-Time Selection panel, specify selection criteria in the header fields and press Enter.
    A list of RBAs or LRSNs that match your selection criteria is displayed. The RBA/LRSNs were recorded in SYSIBM.SYSCOPY and the Db2 Automation Expert SYSCOPY table in that time period. The following figure shows a sample list of recovery points:
    Figure 1. Point-In-Time Selection panel
     AUTOXPRT V1R1   -------- Point-In-Time Selection -------- 2023/10/20  09:26:31 
     Option  ===>                                                  Scroll ===> CSR  
     -------------------------------------------------------------------------------
     Line Commands: S - Select                             Row 1 of 277          +> 
     -------------------------------------------------------------------------------
      Start  2023-09-25-01.00.00.000000  Database    N*         Db2 Subsystem: SS01 
      End    2023-10-25-01.28.43.313983  Space name  TS*                            
     -------------------------------------------------------------------------------
     Cmd Timestamp                  RBA/LRSN             Database Spacenam Dsnum    
         2023-10-04-17.02.43.406244 00DDFFA9E6A0B2907000 NMHACHNG TSCHNG01     0    
         2023-10-04-17.02.43.406852 00DDFFA9E7334C2D2E00 NMHACHNG TSCHNG01     0    
         2023-10-04-17.03.31.179261 00DDFFAA145749062A00 NMHACHNG TSCHNG01     1    
         2023-10-04-17.03.31.179591 00DDFFAA145749062A00 NMHACHNG TSCHNG01     2    
         2023-10-04-17.03.31.179889 00DDFFAA145749062A00 NMHACHNG TSCHNG01     3    
         2023-10-04-17.03.31.179974 00DDFFAA145749062A00 NMHACHNG TSCHNG01     4    
         2023-10-04-17.03.31.180020 00DDFFAA14C2AB351A00 NMHACHNG TSCHNG01     1    
         2023-10-04-17.03.31.180020 00DDFFAA14C2AB351A00 NMHACHNG TSCHNG01     2    
         2023-10-04-17.03.31.180020 00DDFFAA14C2AB351A00 NMHACHNG TSCHNG01     3    
         2023-10-04-17.03.31.180020 00DDFFAA14C2AB351A00 NMHACHNG TSCHNG01     4    
         2023-10-05-13.29.56.745812 00DE00BC344EB6B13400 NMHAQA26 TSQA2602     1    
         2023-10-05-13.29.56.747659 00DE00BC344EB6B13400 NMHAQA26 TSQA2602     2    
         2023-10-05-13.29.56.747730 00DE00BC344EB6B13400 NMHAQA26 TSQA2602     3    
                                                                                    
                                                                                    
    Scroll right to see the event that caused the log entry. The Description column lists the reason for the log entry, such as QUIESCE WRITE(YES) or COPY FULL REORG LOG(NO).
  3. To select an RBA or LRSN, enter S in the Cmd field next to the timestamp and press Enter.
    The recovery point information is transferred to the RESTOREBEFORE Log RBA/LRSN and RESTOREBEFORE Log timestamp fields on the Recover Utility Log Options panel, as shown in the following figure:
    Figure 2. RESTOREBEFORE Log RBA and timestamp transferred to Recover Utility Log Options panel
     AUTOXPRT V1R1 ------- Recover Utility Log Options ------- 2023/10/20  09:27:39 
     Option  ===>                                                                   
                                                                                    
       Creator: TWUSR      Name: TEST                             User: TWUSR       
                                                         Db2 Subsystem: SS01        
        Object event  . . . . . . . .    (Q - Quiesce, blank)                       
        Event generation  . . . . . . 00 (00  -1  -2  -3  ...  -9)                  
        Select point-in-time  . . . . N  (Yes/No)                                   
         Log RBA/LRSN . . . . . . . .                      (blank = current)        
         Log timestamp  . . . . . . .                                               
        Select RESTOREBEFORE  . . . . N  (Yes/No)                                   
         RESTOREBEFORE Log RBA/LRSN   00DE05F6D287C6432000 (blank = none)           
         RESTOREBEFORE Log timestamp  2023-10-09-17.18.48.123300                    
        Backout . . . . . . . . . . . N   (Yes/No)                                  
        Reuse existing data sets  . . N  (Y - Yes, N - No, L - Log only)            
        Parallel object restores  . . N  (Yes/No)                                   
        Max nbr of parallel objects   0  (0 = optimal)                              
        Nbr of dynamic tape drives    0  (0 = optimal)                              
        From Dump . . . . . . . . . . N  (Yes/No)                                   
        Dump Class  . . . . . . . . .                                               
        FLASHCOPY_PPRCP . . . . . . . N  (N - No, P - Pnmo, M - pMp, R - pmR)       
                                                                                    
                                                                                    
                                                                                    

    Note that the timestamp appears as read only. During the recovery, the utility will use an image copy with an RBA or LRSN before the specified point.