Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Restore Points as an Incremental Roll Forward Strategy

Restore Points add significant value to the Dynamic Dump hot backup feature and long term backup maintenance.

To reduce the overhead of Dynamic Dumps, especially when the Dynamic Dumps are run routinely to provide a backup mechanism, the Restore Point feature allows a single Dynamic Dump to be followed by RPs, eliminating the need for additional Dynamic Dumps.

The RP capability introduced support for two types of RPs:

  • Lightweight Restore Point (RP-LW) for use with this option.
  • Checkpoint Restore Point (RP-CP) for use with Dynamic Dumps (ctdump) and transaction roll forward (ctfdmp).

When a Checkpoint Restore Point is created, a Restore Point file is created. This file is very similar to a start file except that it points to the log position of the RP instead of a checkpoint. For more about the file, see Restore Point Files.

Without Restore Points, the ctfdmp utility updates c-tree files starting from a checkpoint in the transaction log that has no active transactions, and continues executing until all the subsequent transaction log entries have been processed. Typically, the starting point for the ctfdmp is specified by the start file that the Dynamic Dump restore (ctrdmp) creates.

Checkpoint Restore Points provide a safe, well-defined position in the transaction log where ctfdmp can terminate. It can then be restarted at this same location (using the Restore Point to create a start file), and run until another Checkpoint Restore Point, and so on. Hence an "incremental roll forward" ability.

Don't use superfiles with incremental roll forward. Superfiles are OK with Dynamic Dump, restore, and a single roll forward. Due to how superfiles store offsets, incremental roll forwards with superfiles could cause a problem. Keep in mind that FAIRCOM.FCS is a superfile, so we recommend omitting this file if you are performing incremental roll forward operations.

Incremental Roll Forward Strategy

Primary Server System Maintenance

  1. Your primary server configuration should include KEEP_LOGS ‑1 to ensure all the transaction logs required by your backup maintenance strategy will be available.
  2. Run an initial Dynamic Dump to serve as the starting point for your backup maintenance.
  3. Periodically create Checkpoint Restore Points, each of which produces a Restore Point file.

Backup Server System Maintenance

  1. Copy the Dynamic Dump script file and the Dynamic Dump stream file (containing the dump contents) from above step 2 (Initial Dynamic Dump).
  2. Run ctrdmp to extract the starting data and index files.
  3. Periodically copy completed transaction logs and Restore Point files from your primary server system to the backup server system, and run ctfdmp to advance the backup system contents to the latest Restore Point.

In the event your primary server is shut down or crashes and it is desired to switch to the backup server, it will be necessary to run ctfdmp from the last restore point until the end of the existing log entries. c-tree files are then available on the backup server ready to be used as your now primary server.

Manually Creating a Point-In-Time Forward Roll

A forward roll can only be started from a checkpoint and not from an arbitrary point in time reached with a rollback operation. Furthermore, the checkpoint must be created when the following conditions are true:

  1. no transactions are active;

    and

  2. no index buffers contain unflushed updates for committed transactions;

    and

  3. no data cache pages contain unflushed updates for committed transactions.

This means that a forward roll requires more than just a starting checkpoint: the state of the data and index files must correspond to the current state of the transaction logs and the position of the starting checkpoint. To roll forward, you will need to have saved a point-in-time copy of the data files, index files, transaction logs, and transaction start files. There are several methods to generate a forward roll eligible backup:

  • Using the dynamic dump (ctdump), followed by dump restore with the forward roll option (ctrdmp)
  • A filesystem level backup taken after a clean server shutdown.
  • A filesystem level backup taken during a server quiesce with full consistency (ctquiet -f)

See Also:

TOCIndex