Recovering a database by restoring to a different Domino server

To clarify which Domino® server is being referenced in the following instructions, these terms will be used:
Recovery server
This is a newly configured, non-started server to which the database is recovered.
Active server
This is the server that has the database that needs to be recovered.
Note: Steps 1-3 used to create the recovery server need only be done once.
  1. Configure a non-started recovery Domino server to be used in this recovery process using the Configure Domino Server (CFGDOMSVR) command.
    Note: Make sure AUTOSTART(*NO) and STRDOMSVR(*NO) are specified on the CFGDOMSVR command.

    If you have previously created a recovery server, you can use that server without having to configure another recovery server. Just follow the instructions for cleaning up data from previous recovery requests.

  2. Copy the NOTES.INI database file in the recovery server to the same data directory and give it a new name.

    If you have previously created and used this recovery server, and copied the original NOTES.INI, you will not need to make a new copy of the NOTES.INI. Just follow the instructions in the following steps for editing the NOTES.INI file.

  3. Make QNOTES the owner of the copied NOTES.INI using the Change Owner (CHGOWN) command.
  4. Edit the current NOTES.INI of the recovery server:
    1. Run the Work with Domino Servers (WRKDOMSVR) command to get to the Work with Domino Servers display.
    2. Select option 13 for the recovery server.
    3. Change the NOTES.INI for the recovery server as follows:
      [Notes]
      Directory=data-directory
      KeyFilename=data-base-name
      Timezone=time-zone
      TRANSLOG_Status=1
      TRANSLOG_Style=1
      TRANSLOG_Path=data-directory/log-directory
      TRANSLOG_MEDIAONLY=1
      where:
      data-directory
      This is the path of the data directory for the recovery server that was specified on the CFGDOMSVR command.
      data-base-name
      This is a database name as it existed on the active server.
      time-zone
      This line should match the line in the active server that contains the database you want to restore on this recovery server. It is optional, but if you are having trouble recovering to the correct point in time, then adding this line may help correct the problem.
      log-directory
      A subdirectory under the recovery server data directory that will receive a copy of the transaction log from the active server.
      Note: If you have previously used the recovery server, or this is the first time using this server, there will be extra lines in the NOTES.INI that need to be deleted or changed so that you only have the lines identified above in the NOTES.INI.

  5. Use the Create Directory (MKDIR) command to create the data-directory path.
  6. Use the Change Owner (CHGOWN) command to change the owner of the subdirectories in data-directory to QNOTES.
  7. Use the Work with Object Links (WRKLNK) command to verify database file data-base-name does not exist in the data-directory of the recovery server. Use option 4 (Remove) to delete the file if it exists.
  8. Use option 3 (Copy from the Work with Object Links display) to copy the database file identified by data-base-name from the active server data directory to the recovery server data directory.
  9. Use the CHGOWN command to make QNOTES the owner of the data-base-name database file on the recovery server.
  10. Verify that there are no files found under the directory specified by log-directory. Use option 4 (Remove) to delete any files that exist.

    The first time you use the recovery server there won't be any objects in that subdirectory to be deleted. If you have used this recovery server previously there could be files in that subdirectory and they need to be deleted. Failure to delete these files may cause the recovery process to fail.

  11. An incremental save must now be done on the active server.

    The active server needs to be set up to support incremental saves. To save the active server incrementally on a V5R1 or later system, you can issue the STRBKUBRM command and specify ACTIVITY(*INCR). If you are on a V4R5 system, you need to change the control group appropriately to get an incremental save. This assumes you have a BRMS control group to save this particular active server. This also assumes that a full save had been done on that active server, with that control group, prior to the attempt to do this incremental save. Failure to have a prior full save will cause the recovery attempt to fail. Depending upon what release of BRMS you are using, you might also be able to do this incremental save using the BRMS System i® Navigator client interface.

  12. The current active transaction log database, from the active server that was just saved, must be copied to the transaction log subdirectory of the recovery server.
    When the incremental save occurred in the previous step, the current active transaction log was copied to the following location: /data-directory/BRMS/COPIEDLOG/Sxxxxxxx.TXN, where xxxxxxx is a 7 digit number. Do the following to the copy of this most current transaction log:
    • Run the command WRKLNK '/data-directory/BRMS/COPIEDLOG/*'
    • Specify option 3 (Copy) next to the file named Sxxxxxxx.TXN (there should be only one, if more than one select the largest numbered name).
    • Press F4 to prompt.
    • For the To Directory (TODIR) parameter, specify '/log-directory'.
    • For the Data Format (DTAFMT) parameter, specify *BINARY.
    • For the Owner (OWNER) parameter, specify *KEEP so QNOTES remains the owner of the copied file.
    • Press Enter to copy the file.
    • Verify that the file is copied successfully to the recovery servers log-directory path.
    • Verify that QNOTES is the owner of the copied file. If QNOTES is not the owner, issue a CHGOWN command to change the owner to QNOTES.
    Note: It is important to note that the transaction log must be the same name in the recovery server as the name in the active server where it was copied from.
  13. If the database to be recovered needs to be restored to a specific date and time, to be able to recover a document, depending upon what release of BRMS you are using, you may need to create a data area and change the data area to contain the date and time of the recovery. If you are recovering the database to the most current time, no data area or point in time needs to be specified.
  14. Use WRKMEDIBRM to select the database to be restored and specify that the database is to be placed in the data directory of the recovery server.

    The name of the database to be restored to the recovery server must be the same name and case as is found on the active server. Depending upon what release of BRMS you are using, you may be able to use the BRMS System i Navigator client interface to do this point-in-time restore request.

  15. Once the database has been recovered, copy (or FTP in binary mode), that newly recovered database to a Domino server that can be accessed from a client.

    Because we never want to start the recovery server, it is desirable to copy this recovered database to a Domino server that is active and can be accessed by a client. Remember to use the CHGOWN command to make QNOTES the owner of the newly copied version of the database file before accessing the database. Be careful where you move the database to. You wouldn't want to move it to a server that could replicate this database file and either cause problems for the newly recovered database file or the existing database file.

  16. If you are trying to recover a document from the database, then you can use cut and paste from this database to the database on the active server.
  17. Having successfully recovered the database, do not forget to delete the database from the recovery server. At some point you will also want to delete the copied database from the active server that you copied the database file to.
It is important to follow the above instructions in the order they are presented. Failure to follow the steps as presented can cause failures when trying to recover a Domino database.
Having read the above steps, here are some items of interest summarizing the above or further explaining some of the details:
  • You must have archival transaction logging enabled for the active server and for the databases you will want to recover.
  • You must be using IBM® Backup, Recovery and Media Services for i to back up your active servers.
  • A full online save, using the BRMS control group, has been done previously for this server so an incremental save can occur and be used in the recovery process.
  • You must have enough authority to successfully run the CFGDOMSVR command.
  • You must have enough authority to copy Domino database files.
  • You must have enough authority to run the necessary BRMS commands to recover a Domino database.
  • QNOTES must be the owner of objects that the Domino server references and you have enough authority to change the owner of a file to QNOTES when necessary.
  • You should copy the recovered database to a server that will not try to replicate with this recovered database.
  • If a database you are recovering is being restored to the active server and you are replicating that database, you need to consider if temporarily turning off replication for this database is necessary or not. You may not need to turn off replication, but this is intended to make you consider what is happening to this database prior to actually restoring the database.
  • You must have enough authority to cut and paste the identified documents from the recovered database to the active database.
  • Do not try and use CHGDOMSVR on the modified NOTES.INI of the recovery server. This doesn't work and could cause problems. Since the recovery server is not recommended to be started, there are no valid Domino console entries to be displayed. By never starting the recovery server you reduce the chances of problems occurring on the recovery of a database
  • Until there are some additional changes made available from BRMS, the saved transaction logs that are restored, and used in the recovery process, are initially restored to the active server's directory that they were saved from and then copied to the recovery server. This means that either you need to restore to a recovery server that is located on the same system as the save occurred OR if restoring to a different system, you might need to create the directories and subdirectories of the active server as it existed when it was saved. When the BRMS changes are made available, then the saved transaction logs will be restored to the recovery server specified on the restore.