ROLLFORWARD allows users to roll forward the transactions stored in supplied log files to a specified location. This command must be run while in exclusive use mode.
Invocation
ROLLFORWARD can be executed interactively, embedded in a host language, or dynamically prepared.
Authorization
To use the ROLLFORWARD command you must be a super user.
Syntax
ROLLFORWARD location-name USING log-file-path
Parameters
location-name
|
Identifies the location to be recovered.
|
log-file-path
|
Specifies the directory containing the log files that need to be applied to the appropriate location. These log files must have been created as the result of a standard or incremental BACKUP command.
|
Example
The following command rolls forward the transactions in MYLOC, using the log files specified in
d:\backuplocs\xdb20051017151315000001:
ROLLFORWARD MYLOC USING D:\BACKUPLOCS\XDB20051017151315000001
Description
The ROLLFORWARD command is used to roll forward transactions contained in log files for a specified location. These log files must have been created by a standard or incremental BACKUP command.
The ROLLFORWARD command is used when a media or disk failure has occurred. After placing a backup of a location back on disk, ROLLFORWARD commands specifying the appropriate log files can bring the backup location up to date, so that its state is consistent with the location at the time of the crash.
After performing a standard backup (which is mandatory for all recovery scenarios), which type of backup you perform is up to you. Always performing standard backups takes longer than performing incremental backups but the recovery process from them is much easier and quicker. Performing incremental backups is quicker than performing standard backups but more ROLLFORWARD steps might be necessary to recreate your location.
Resetting Logging System
The XDB Server's logging system automatically creates a series of log files when a new location is created. For an existing location, logging should be manually reset as a part of the location backup process.
Follow the steps below to manually reset location logging:
COMPACT Commands
Since using a COMPACT command on a location renders that location's current log files useless, a location should be backed up (and the log files for that location reset) immediately after any COMPACT commands are issued against that location. Log files contain internal information that maps to a particular table structure. COMPACT commands alter the table structure of the location, changing this log-to-table mapping, and making ROLLFORWARD with the previous log files impossible.