Performing an external backup of an RS secondary server

Before you begin

To perform an external backup of an RS secondary server, the STOP_APPLY configuration parameter must not be enabled. If STOP_APPLY is enabled, an error is returned. The server switches to STOP_APPLY mode when a backup is performed on an RS secondary. After the archive checkpoint is processed, the RS secondary server stops applying logical logs, but continues receiving logs from the primary server.

To perform an external backup of an RS secondary server that has a DELAY_APPLY configuration parameter value greater than 0, it might be necessary to temporarily decrease the parameter value. Performing the backup requires that the RSS process a checkpoint in the logical log, and if no checkpoint is observed within the amount of time that is specified by the onmode -c block timeout command in the second step of the following procedure, a backup is not permitted. The DELAY_APPLY configuration parameter can be decreased by the onmode -wf DELAY_APPLY=setting command.

About this task

The primary database server must be online or in quiescent mode during an external backup.

To perform an external backup:

Procedure

  1. Ensure that the LOG_STAGING_DIR configuration parameter on the RS secondary server is set to point to a valid staging directory.
  2. To obtain an external backup, block the database server with the onmode -c block timeout command.
    The timeout parameter indicates the number of seconds that the RS secondary server waits to receive a checkpoint. The timeout parameter is valid only when the onmode -c block command is run on an RS secondary server. You must wait for the onmode -c block command to return successfully before you proceed with the external backup.
  3. To back up the storage spaces and administrative files, use a copy command, such as cp, dd, or tar on UNIX™ or copy on Windows™, or a file-backup program.
    You must back up all chunks in the storage spaces.
  4. To resume normal operations, unblock the database server by using the onmode -c unblock command.
  5. After you perform the external backup, back up the current log and any new logs with the ON-Bar or ontape utilities.
    Important: Logical log backup is only possible on the primary server.

    If the DELAY_APPLY configuration parameter is set, the logs that are required for the restore process are not necessarily those logs that are currently active on the primary server because some logs could already be archived.

Results

After the backup completes, if the DELAY_APPLY setting on the RS secondary server was decreased, it can be set to its original value by the onmode -wf DELAY_APPLY=setting command. After an external backup, you can perform an external restore if a disk or the whole system fails.