Skip to main content

Restore All Databases Using ^DBREST

Restore All Databases Using ^DBREST

Choosing 1 from the ^DBREST menu is equivalent to choosing 2 from the ^BACKUP menu.

Note:

If you are restoring mirrored databases, review Mirrored Database Considerations before you perform this procedure.

The following procedure is an outline of an example that restores all directories. It shows the beginning prompts of the restore process. As it continues, the utility asks you very specific questions while stepping through the restore process.

  1. Select to restore all directories from the utility menu. This option restores all directories that are on the backup medium.

    %SYS>Do ^DBREST
     
                                  DBREST Utility
             Restore database directories from a backup archive
     
    Restore: 1. All directories
             2. Selected and/or renamed directories
             3. Display backup volume information
             4. Exit the restore program
        1 => 1
    
    
  2. Confirm that you want to restore all directories:

    Proceed with restoring ALL directories Yes=>
    
  3. Next you are asked to enter the top path you want all the databases to be restored to. The system prefixed it to the original path of the database to be restored. So all the databases are restored under this directory with their original directory as a subdirectory to this directory. Press Enter to ignore it and restore the databases to their original path.

    Top directory for all Databases to be restored to (? for Help)?
    
  4. Indicate whether you want to suspend InterSystems IRIS processes while restoring takes place. InterSystems recommends suspending processes.

    Do you want to set switch 10 so that other processes will be
    prevented from running during the restore? Yes =>
    
  5. Specify the first file from which to restore. You can press Enter to accept the default file, which is the last full backup.

    Specify input file for volume 1 of backup 1
     (Type STOP to exit)
    Device: c:\iris-install\mgr\backup\FullAllDatabases_20180323_001.cbk =>
    
    
  6. Check that the description of the backup is correct and verify that this is the file you want to restore.

    This backup volume was created by:
       InterSystems IRIS for Windows 2018.1.1
     
    The volume label contains:
       Volume number      1
       Volume backup      MAR 23 2018 09:52AM Full
       Previous backup    MAR 22 2018 11:00AM Incremental
       Last FULL backup   MAR 16 2018 11:00AM
       Description        Full backup of ALL databases, whether or not they are in
                          the backup database list.
       Buffer Count       0
    Is this the backup you want to start restoring? Yes =>
    
    
  7. The utility tells you which directories it will restore, and the restore proceeds.

    The following directories will be restored:
    c:\iris-install\mgr\
    c:\iris-install\mgr\irisaudit\
    c:\iris-install\mgr\test\
    c:\iris-install\mgr\user\
    
     
    ***Restoring c:\iris-install\mgr\ at 10:46:01
    146045 blocks restored in 241.3 seconds for this pass, 146045 total restored.
    
    
  8. Specify the input file for the next incremental backup to restore, or enter stop if there are no more input files to restore.

    Specify input file for volume 1 of backup following MAR 23 2018  09:52AM
     (Type STOP to exit)
    Device: stop
    
    
  9. Indicate whether you want to restore other backups. When you answer Yes, the procedure repeats. When you respond No, the system mounts the databases you have restored.

    Do you have any more backups to restore? Yes => No
    Mounting c:\iris-install\mgr\
        c:\iris-install\mgr\       ... (Mounted)
     
    Mounting c:\iris-install\mgr\irisaudit\
        c:\iris-install\mgr\irisaudit\  ... (Mounted)
      
    Mounting c:\iris-install\mgr\test\
        c:\iris-install\mgr\test\  ... (Mounted)
     
    Mounting c:\iris-install\mgr\user\
        c:\iris-install\mgr\user\  ... (Mounted)
     
    
    
  10. Specify which journal entries you want to apply to the restored databases and the name of the journal file you are restoring. Normally, you select option 1 and apply only those changes that affect the directories you have just restored.

    Note:

    For information about what happens when you restore all entries for all directories or selected directories and globals, see Restore Globals From Journal Files Using ^JRNRESTO.

    Restoring a directory restores the globals in it only up to the
    date of the backup.  If you have been journaling, you can apply
    journal entries to restore any changes that have been made in the
    globals since the backup was made.
     
    What journal entries do you wish to apply?
     
         1. All entries for the directories that you restored
         2. All entries for all directories
         3. Selected directories and globals
         4. No entries
     
    Apply: 1 =>
    
    
  11. Restore from the journal files begins after confirming several pieces of information:

    We know something about where journaling was at the time of the backup:
    0: offset 172940 in c:\iris-install\mgr\journal\20180323.002
     
    Use current journal filter (ZJRNFILT)? No
    Use journal marker filter (MARKER^ZJRNFILT)? No
    Updates will not be replicated
     
    The earliest journal entry since the backup was made is at
    offset 172940 in c:\iris-install\mgr\journal\20180323.002
     
    Do you want to start from that location? Yes => Yes
    Final file to process (name in YYYYMMDD.NNN format): <20180323.003> [?]
          =>
     
    Prompt for name of the next file to process? No => No
     
    Provide or confirm the following configuration settings:
     
    Journal File Prefix: =>
     
    Files to dejournal will be looked for in:
         c:\iris-install\mgr\journal\
         c:\journal\altdir\
    in addition to any directories you are going to specify below, UNLESS
    you enter a minus sign ('-' without quotes) at the prompt below,
    in which case ONLY directories given subsequently will be searched
     
    Directory to search: <return when done>
    Here is a list of directories in the order they will be searched for files:
         c:\iris-install\mgr\journal\
         c:\journal\altdir\
    The journal restore includes the current journal file.
    You cannot do that unless you stop journaling or switch
         journaling to another file.
    Do you want to switch journaling? Yes => Yes
    Journaling switched to c:\iris-install\mgr\journal\20180323.004
     
    You may disable journaling the updates for faster restore.
    Do you want to disable journaling the updates? Yes => yes
    Updates will NOT be journaled
    
    
  12. The utility displays its progress and indicates when it is complete:

     
     
    c:\iris-install\mgr\journal\20180323.002
      61.32%  65.03%  68.44%  72.21%  75.86%  79.26%  82.73%  86.08%  89.56%  
      92.99%  96.07%  98.87%100.00%
    ***Journal file finished at 11:03:31
     
     
    c:\iris-install\mgr\journal\20180323.003
      16.17%  17.10%  17.90%  18.90%  20.05%  21.33%  22.58%  23.81%  25.15%  
      26.32%  27.65%  28.85%  30.08%  31.37%  32.59%  33.98%  35.16%  36.25%  
      37.32%  38.41%  39.55%  40.72%  41.81%  42.83%  43.85%  44.89%  46.00%  
      47.15%  48.24%  49.28%  50.32%  51.41%  52.54%  53.71%  54.76%  55.80%  
      56.85%  57.97%  59.10%  60.16%  61.17%  62.19%  63.24%  64.32%  65.18%  
      66.02%  66.87%  67.71%  68.52%  69.34%  70.14%  70.96%  71.76%  72.60%  
      73.58%  74.51%  75.43%  76.35%  77.26%  78.17%  79.07%  79.69%  80.31%  
      80.93%  81.56%  82.20%  82.83%  83.47%  84.27%  87.00%  88.57%  91.65%  
      93.03%  96.09%  97.44%  99.04%100.00%
    ***Journal file finished at 11:03:32
     
    Journal reads completed. Applying changes to databases...
      14.29%  28.57%  42.86%  57.14%  71.43%  85.71% 100.00%
     
    [journal operation completed]
    
    
FeedbackOpens in a new tab