Hot Backup

Hot backup is a configuration where one machine is in a standby mode, ready to take over the load from a failing system. Starting with D3 9.0, hot backup now tests to confirm that a license has been purchased.

It is often required to have a system configuration where downtime due to a hardware or software failure cannot be tolerated, or must be reduced to a very short time. A solution more affordable than fault tolerance is to double all necessary hardware resources and maintain the database on two normal systems. This document examines the issues involved in this hot backup configuration, its advantages, its limitations and the system administration procedures.

Hot Backup Solution

The hot backup configuration involves two systems: one master system, which is the system in operation, and a slave system, which is in stand-by mode. Both machines are connected by a fast TCP/IP connection. Users are normally connected to the main system. The backup system is also booted, and has a copy of the database on the main system. The two machines do not need to be absolutely identical: the backup machine just needs the necessary resources (disk, memory, connectivity, and so on) to support the applications.

During normal operations, all updates to the database on the main system are applied to the backup system, over the network.

In case of a failure of the main system, the users are switched to the backup machine, and the application is restarted. The downtime is limited to the switchover time (may be just the time for the terminal concentrators to establish an ethernet connection to the other machine), and the data loss limited to the updates not yet transmitted to the backup machine. This loss is usually limited to a few seconds worth of work.

NOTE

The backup machine is not necessarily idle. Other applications can be loaded on the backup machine. Also, since the backup machine has an exact copy of the database, it can be used for editing reports, file saves, and so on.

Advantages

Disadvantages

The system administration and recovery procedures require some manual intervention. The system relies heavily on UNIX networking, which must be understood by the system administrator.

Main System Failure Recovery

This section outlines the operation required to recover from a failure of the main system. After the failure occurred, the users have been switched to the backup system and the application restarted. The main machine is repaired and must now be set back to the same level as the backup machine.

While the main machine is down, the database on the backup machine is naturally evolving. To record all changes on the backup machine, all updates are recorded, using the transaction logger mechanism. If the repair time of the main machine is expected to be short (a few hours), the transaction journal can be left on the disk. If the repair time is expected to be longer, it is probably better and safer to write the transactions on tape.

Assuming the main machine’s database has been completely destroyed following a multiple disk crash, resynchronizing the main machine involves running a full save on the backup machine, and restoring it on the main machine, and switching the users back to the main system. The problem is that the file save and restore operation can be very long, taking potentially days. It would obviously be unacceptable to stop the operations during this. Therefore, while the save and restore proceeds, updates to the database must be logged. Updates can be stored to tape. After the restore has been completed on the main machine, the transactions that have been accumulated during the save/restore operation are applied to the main database. During this transaction log load, it is likely that more updates will be done on the backup machine, resulting in more transaction tapes. Depending on the volume of data, there may be a few iterations of this process:

If there is enough disk space on the backup machine, and if the downtime of the main system (including the file save/restore) is expected to be small, it is possible to leave all the updates on disk. Resynchronizing the two machines is then simpler:

Backup System Failure Recovery

If the backup system fails, a procedure similar to the one described for the main system recovery must be applied. The only difference is that the users are never stopped. Essentially, a full save is taken out of the main machine, restored on the backup machines, then all the updates applied to the backup machines. The only impact on normal operations are a higher system load due to the file save, and, obviously, a higher risk, since there is no backup.

Verifying that It Works

This configuration is usually applied to very large databases. Making sure everything works and that no data loss occurs is of utmost importance. Network reliability is obviously critical. The various processes (servers) involved in the communication constantly check on each other, assign numbers to the messages on the network and also make sure the transaction logging mechanism itself is operating normally by periodically writing some test data and making sure the updates are sent. The System Administrator can control the databases by periodically running some application report, verifying that the results are identical. All network incidents, as well as unusual circumstances, are reported to a predetermined list of users, so that an incident does not stay unnoticed for a long time.

System Setup

To set up a hot backup system, the system administrator must complete the following steps.

  1. Establish a network between the two systems. This network must support
    TCP/IP (for example, Ethernet, Token Ring, and so on). The system administrator must set the network names of both systems, even though only the receiver’s host name is used. The hot backup connection only requires access to TCP. Other elements, such as NFS, FTP, and so on are not required.

  2. Determine a free TCP/IP port number. Use the netstat -a UNIX command to determine what is currently in use. A value such as 2000 or 3000 is usually safe.

  3. Load the D3 database on the main machine. This includes setting the application, the user files, and so on.

  4. On the master system, determine which files are going to be set as DL. That is, which updates will be sent to the backup machines. It is generally not advised to set the system so that all updates to all files be sent to the backup system. This has the side effect of also mirroring system files. It is better to exclude the dm account from the transaction log. Use the set-dptr TCL command to do change the attributes of files and/or accounts.

  5. Do a save of the main machine, and restore it on the backup system. This can also be done using the network, as detailed in Network Save/Restore. Otherwise, the save/restore can be done on tape.

  6. Set up the servers on both systems.

  7. Start the master and slave servers.

See Also

hot-backup command (UNIX), Network Save/Restore, Tape Socket