A.1. Heterogeneous Server Network Support
7. Backups and Data Integrity
7.6 System Rollback
System rollback restores the system to its status as of a specified point in time. For example, if company payroll processing was started at 1:00 PM and something went awry later in the afternoon, a system rollback can reset the system to the way it was at 1:00 PM, so processing could start again. If other applications using transaction processing files were running while the payroll processing was under way, these other files would also be rolled back to their 1:00 PM state. The Administrator should be aware of all files and related data that will be affected before starting a rollback to avoid interfering with multiple, unrelated systems sharing a c-treeACE Server.
A rollback, like recovery, involves a dynamic dump script with different keywords to control how the rollback is to be done.
Backups and Data Integrity
Running the Rollback Utility
The ctrdmp utility performs a system rollback as well as dynamic dump recovery. ctrdmp checks the first keyword in the script file. If the first line is !ROLLBACK the script is used for a rollback. If it isn’t, the script is considered a dynamic dump script and used for a dump or a recovery.
Note: As in dump recovery, be sure the particular c-treeACE Server undergoing the rollback is not running when ctrdmp starts, since ctrdmp is a c-treeACE Server and the two c-treeACE Servers operating simultaneously interfere with each other. Typically, error TCOL_ERR (537, transaction log collision) is observed under these conditions.
Perform a rollback as follows:
1. Collect ctrdmp, the transaction log files covering the period from the target time to present,
and the current log files into a working directory.
2. Start ctrdmp the same way as any program in the environment.
3. When prompted, enter the name of the rollback script file to be used.
The rollback begins automatically and produces a series of messages reporting recovery progress. A message returns when the utility completes a successful rollback.
A successful ctrdmp completion outputs the following message to CTSTATUS.FCS:
DR: Successful Dump Restore Termination
A failed ctrdmp outputs the following to CTSTATUS.FCS:
DR: Dump Restore Error Termination...: <cterr> where <cterr> is a c-tree error code number.
If for some reason ctrdmp terminates prematurely (for example, a fatal error causes ctrdmp to
terminate abnormally), the “Dump Restore Error Termination...” message may not be written to
CTSTATUS.FCS. In that case, ctrdmp may have written error messages to standard output or to
CTSTATUS.FCS before terminating that explains the premature termination.
Script File for Rollback
The format of the Rollback script is the same as a dynamic dump script. Accepted rollback options are as follows:
!COMMENT
Default: Off
Informs the c-treeACE Server that the remainder of the script file is for documentation purposes only and is not to be evaluated. Do not place keywords after this keyword.
!DATE <mm/dd/yyyy>
Date to perform dump. If the date has already passed, the !FREQ interval is applied to find the next scheduled time. If no !DATE or !DAY is specified, today is assumed.
Backups and Data Integrity
!#FCB <number of files>
Default: 100 files
When restoring a large number of files from a dynamic dump backup with ctrdmp, the dump
restore can possibly fail with error FNUM_ERR (22, file number out of range). Should you
encounter this error with a very large number of restored files, consider the !#FCB option in your
ctrdmp script file to increase this value.
!FILES
The !FILES keyword is followed by names of files to include in the dynamic dump. This must be the next to last keyword in the script file and it takes no arguments.
Filenames must begin following the !FILES keyword line with one line for each file. File names should not be listed on the same line as the !FILES keyword. The !END keyword terminates the list of files on a single line.
We strongly suggest that FAIRCOM.FCS be included in your list. Members of a superfile cannot
be individually “dumped.” The entire superfile must be dumped; that is, the name of the host superfile, not a superfile member, is placed in the list of files. The * and ? wildcards are supported. See !RECURSE for other options.
!ROLLBACK
!ROLLBACK must be the first entry in the script. It takes no argument. If !ROLLBACK is not the
first entry, the script is interpreted as a dynamic dump script.
!SKIP
Default: !SKIP
Skip recovery for any file listed under the !FILES keyword if the file already exists.
Note: Be aware of the differences between using !SKIP with a recovery and with a rollback (see
"System Rollback" (page 117) discussion) where it must be used with caution.
Note: Only the files specified by the !FILES keyword will be restored. It is not necessary to restore all files contained in the dump.
!TIME <hh:mm:ss>
Time of day, on a 24 hour clock, to perform back up. If the time has already passed, then the
!FREQ interval is used to find the next scheduled time. If a !DATE or !DAY is specified without a
time, then the time defaults to 23:59:59.
Backups and Data Integrity