DOCS

Restoring a Database

The restore operation repeats the write actions recorded in the LOG file for the databases that are connected to the server. This can be useful or necessary for a wide variety of reasons, for example:

  • You may want to keep two identical copies of your current data for additional data security (not just two backups).
  • You may need to roll back your database to a certain previous state for test reasons.
  • Your database may have become corrupted and unreadable due to hardware failures and you need to reconstruct it with the help of the LOG files.

In each case, an existing backup of all databases connected to the server is required. For information on backups, see Backing up Rochade Databases.

Before reconstructing your database from the LOG file, you will need to restore the appropriate backup to the hard disk. After that, you can apply the LOG files, observing the correct order.

To apply the LOG files, use the service program rodbucx<os>. You can process one LOG file per program run. The most important options controlling the behavior of rodbucx<os> to restore a database are ‑restore=<logfile>, ‑time=<t_stamp>, and -verbose.

  • If you call the program with the option -restore=<logfile>, you can repeat all write operations logged in <logfile> for all databases specified in <section>.
  • If you specify the option -time=<t_stamp>, rodbucxn will process only those LOG file entries whose time stamps are smaller than or equal to <t_stamp>. By default, rodbucx<os> processes the entire LOG file.

The format for <t_stamp> is YYYYMMDDHHMMSS, where the letters represent year, month, day, hour, minute, and second, in that order. You can omit the hours, minutes, and seconds. In this case, the string is filled with 0 to reach its full length.

Example (UNIX)

rodbucxu ROSRV -restore=rodb000523.log -time=20020611

The rodb000523.log file is processed only if the databases specified in the section ROSRV have the same LOG signature as the file. All actions that are logged in this file are repeated for the corresponding databases up to the date specified with the -time option.

  • The option -verbose returns additional log information. This information is of significance only in case of problems in which you contact ASG Customer Support for assistance.