The NetWare Btrieve Roll Forward utility is an interactive workstation utility that allows you to recover changes made to a Btrieve file between the time of the last backup and a system failure. The changes are stored in a log file.
If a system failure occurs, you can restore the backup copy of your Btrieve file and run the Roll Forward utility. The utility applies the changes stored in the log file to your backup copy.
This section discusses the following topics:
Roll Forward utilities are available for DOS, OS/2, and MS Windows operating environments, as follows:
You run BROLLFWD from the command line. (The Roll Forward utility DBROLL.EXE, which was used in the DOS environment in previous releases, is obsolete.) For more information, see Running the Roll Forward Utility in a DOS Environment.
You run PBROLL interactively.
You run WBROLL interactively. NOTE: The procedure for running PBROLL and WBROLL is the same. For more information, see Running the Roll Forward Utility in an OS/2 or MS Windows Environment.
In general, use the steps in the following procedure first to enable the NetWare Btrieve logging feature and then, in the event of a system failure, to recover your Btrieve files.
Back up your data files (and any current log files, if applicable), enable the logging feature using the Btrieve Setup utility, and create a log configuration file.
For more information, see Setting Up Files for Logging and Backing Up Data Files, and Example of Restoring a Data File.
WARNING: You cannot take advantage of the Roll Forward utility unless you have enabled the logging feature and created a log file before a system failure.
Ensure that your system meets the system requirements for running the Roll Forward utility and then start the utility.
For more information, see Running the Roll Forward Utility in a DOS Environment and Running the Roll Forward Utility in an OS/2 or MS Windows Environment.
Set the appropriate Roll Forward utility options in one of the following ways:
For more information, see Setting Options for the Roll Forward Utility.
Select the Btrieve file (or files) you want to recover by adding that item to the Roll Forward utility's queue.
For more information, see Placing Items in the Queue.
Run the Roll Forward utility, which applies the changes stored in the log file to your backup copy of the Btrieve file.
For more information, see Rolling Forward Items in the Queue.
NOTE: For an example of the procedures used to handle data and log files in a roll-forward operation, see Example of Restoring a Data File.
To take advantage of NetWare Btrieve's logging feature and the Roll Forward utility, you must first set up your Btrieve files for logging, as described in the following procedure. Subsequent sections discuss each step in this process.
Back up your data files before you activate the logging feature.
For more information, see Backing Up Data Files.
Activate Btrieve's logging configuration option using the Setup utility (BSETUP.NLM).
For more information, see Activating the Btrieve Logging Option.
Create the log configuration file, BLOG.CFG.
For more information, see Creating the Log Configuration File.
Be sure to make a backup copy of your Btrieve files before logging begins.
When you activate logging for a given file, NetWare Btrieve uses the corresponding log file to record all the operations that change the specified file. Btrieve continues appending subsequent operations to the end of this log file until you delete the log file. Consequently, it is important to perform periodic maintenance to reduce the size of your log files.
IMPORTANT: Every time you back up your Btrieve files, delete the associated log files before executing any further operations that could change those log files. Synchronizing the backup data files and the associated log files is critical to recovering operations successfully.
IMPORTANT: Keep the original copy of the data files and their associated log files until you have successfully rolled the data files forward using the original logged information. Be aware that the Roll Forward operation modifies the log files after each roll forward attempt, so you cannot apply log entries twice to the same data files.
IMPORTANT: Be aware also that once you have performed a Roll Forward operation, Btrieve does not retain the original logging information. Instead, if you have enabled the logging feature, Btrieve adds to the log file a record of all the operations that affect the specified file subsequent to the last Roll Forward operation.
IMPORTANT: For an example of the procedures used to handle data and log files in a roll-forward operation, see Example of Restoring a Data File.
You can activate NetWare Btrieve's logging feature by specifying Yes for the Logging of Selected Files configuration option in the Setup utility. The default setting for this option is No.
If you did not specify Yes for this option when you configured NetWare Btrieve, complete the following steps to activate the Btrieve logging feature:
Run the Setup utility (BSETUP.NLM).
When the Available Options menu appears, select Set Btrieve Configuration.
When the Current Btrieve Configuration screen appears, specify Yes for the Logging of Selected Files option.
Press Escape.
When the Save Configuration Changes? window appears, select Yes.
To have your changes take effect, unload Btrieve using the BSTOP command and then reload it using the BSTART command.
Btrieve reloads with the logging feature activated.
For additional information about this procedure see Logging of Selected Files in Chapter 3, "Installing and Configuring NetWare Btrieve."
The name of the NetWare Btrieve log configuration files is BLOG.CFG. It specifies the names of all the Btrieve files for which you want to log changes on a given volume.
You should create a BLOG directory at the root of each volume containing Btrieve files for which you want to log changes. You can then create a BLOG.CFG file in each BLOG directory and place entries in it, as follows:
Create an empty BLOG.CFG file.
You can use any text editor to create the BLOG.CFG file. Remember that you must create a BLOG.CFG file in the BLOG directory of each volume on which you want to log files.
Open the BLOG.CFG file.
Create an entry in the BLOG.CFG file for each Btrieve file for which you want to log operations.
Use the following format to create the BLOG.CFG file entries:
\ directory1\ btrvFile[=\ directory2\ logFile]
Make sure each entry fits completely on one line. (Each line can contain a maximum of 256 characters.) If you have room, you can place multiple entries on the same line, but you must separate each entry with at least one space.
NOTE: A single log entry cannot contain any spaces, although you must separate multiple entries on the same line with at least one space.
If you do not provide a name for the log file, Btrieve assigns the original filename plus a .LOG extension to the file when you first open it.
For example, assume that you did not specify a name for log file associated with the Btrieve file TEST01.DAT located in the directory TEST. Btrieve would assign the full name \TEST\TEST01.LOG to the default log file, which in this case, shares the same directory as the Btrieve file.
The following three examples show sample entries in the file \BLOG\BLOG.CFG on the SYS: volume of the CORP server. Each entry produces the same result: activity in the file \DATA\B.BTR on the CORP server's SYS: volume is logged into the file \DATA\B.LOG on the CORP server's SYS: volume.
\data\b.btr\data\b.btr=\data\b.log\data\b.btr=\\corp\sys:\data\b.log
The next example (again, a sample entry in \BLOG\BLOG.CFG on the CORP server's SYS: volume) shows how to log activity to a volume other than the Btrieve data file's volume:
\data\b.btr=\\corp\vol1:\data\b.log
This entry directs Btrieve to log activity in the file \DATA\B.BTR on the CORP server's SYS: volume into the log file \DATA\B.LOG on the VOL1: volume of the CORP server. You can also use the following syntax to achieve the same result:
\data\b.btr=\\corp\vol1:data\b.log
To run the Roll Forward utility in a DOS environment, enter the BROLLFWD command using the following format:
BROLLFWD < btrvFile | @listFile | /A> [/D: nn] [/T: nn] [/K: nn] [/H] [/V] [/L] [/O: ownerName]
The following list describes the BROLLFWD command syntax:
The following list shows a few ways you can run the Roll Forward utility:
NOTE: The following information applies to both OS/2 and MS Windows operating environments, but the screen examples show MS Windows screens only.
To use the Roll Forward utility in the OS/2 and MS Windows environments, complete the following steps:
Back up your data and log files.
For more information, see Backing Up Data Files.
Set the Roll Forward utility's program options.
For more information, see Setting Options for the Roll Forward Utility.
Place in the utility's queue all the items you intend to roll forward.
For more information, see Placing Items in the Queue.
Start rolling forward the items in the queue.
For more information, see Rolling Forward Items in the Queue.
Following is a brief description of the Roll Forward utility's pulldown menus. Subsequent sections describe each step in the Roll Forward recovery procedure in detail.
After starting the Roll Forward utility, you can access two pulldown menus: Queue and Options.
HINT: If you are not using a mouse, you can access the menus by pressing and holding the Alt key while typing the letter highlighted in the menu selection. For example, to select the Queue pulldown menu, hold down the Alt key and press Q. To move between fields in the dialog boxes, use the Tab key.
When you select Queue from the main menu, a pulldown menu offers the following:
When you select Options from the main menu, a pulldown menu offers the following:
Options |
Displays a dialog box that enables you to set the data buffer length and the list options. |
About |
Displays the version of the Roll Forward utility that you are currently running. |
Set the desired program options for the Roll Forward utility before using the utility to apply the logged changes to the specified Btrieve file or files. These options control the following:
Table 7, describes each option in detail. Subsequent sections describe the two methods you can use to set these options:
Table 7. Roll Forward Options
To set Roll Forward options using the Options pulldown menu, complete the following steps:
Select Options from the Roll Forward main menu.
Select Options from the Options pulldown menu to display the Btrieve Roll Forward dialog box, shown in Figure 23.
Figure 23
Roll Forward Utility: Options Dialog Box
Using the guidelines provided in Table 7, set the options you want to activate for logging your selected files.
After setting the options, select one of the following buttons to execute your choice:
You can also change the setting of the Roll Forward utility's options by manually editing the MS Windows initialization file, NOVDB.INI. (You cannot edit the OS/2 initialization file).
These settings are specified under [wbroll] in NOVDB.INI. The following is an example specification for [wbroll]:
[wbroll] datalength=4 exclusive=no outputmode=ASCII listverbose=yes datalist=32 keylist=16
See Table 7, for an explanation of these options.
The Roll Forward utility works on a queued-job basis. When you specify the Btrieve files that are to be rolled forward, the utility places them in the queue.
This section discusses the Roll Forward utility's queue and explains how to perform the following tasks:
The queue can hold a maximum of 32 items. Any of the following represents one item:
To add items to the queue, complete the following steps:
Select Add from the Queue pulldown menu.
The Add dialog box, similar to that shown in Figure 24, appears:
Figure 24
Roll Forward Utility: Add File Dialog Box
Select the Btrieve file or files to be rolled forward, as follows:
NOTE: Setting show dots=on in your NET.CFG file makes the . and .. directory notation visible, allowing you to select the previous directory or root directory from the Directories list box. Refer to your NetWare documentation for details about modifying the NET.CFG file.
Specify the list option for the queue item you are adding, as follows:
If the Btrieve file has an owner name, specify the owner name in the optional [Owner] text box.
Select the Add button to add the item to the queue.
Notice that the Queue button, which has been dimmed until now, becomes available after you select the Add button.
Repeat Steps 2 through 5 to add each additional item to the queue.
To review the items you have placed in the queue, select the Queue button.
The items selected appear on a screen similar to that shown in Figure 25.
Figure 25
Roll Forward Utility: Items in the Queue List
When you are finished, click on the OK button.
NOTE: At any time, you can click on the CANCEL button to cancel your changes and return to the previous screen.
If you need to delete an item from the queue, complete the following steps:
Select View from the Queue pulldown menu.
Select the item you want to delete.
Click on the Delete button to remove the item from the queue.
Click on the OK button.
NOTE: If you change your mind and want to cancel your deletion, click on the CANCEL button instead of OK.
You can use either of the following methods to change the list options (that is, to change your choices regarding the List Only and List File check boxes) for a given queue item:
You can use either of the following methods to view items in the queue:
Once the queue contains all the items for which you want to roll forward changes, you are ready to start the roll forward procedure. Before you begin, however, back up your data and log files, as explained in Backing Up Data Files.
Select Start from the Queue pulldown menu.
The Queue Menu, with the Start command highlighted, appears.
Figure 26
Roll Forward Utility: View Queue Contents Dialog Box
NOTE: The Roll Forward utility allows a maximum of 250 concurrent transactions per Btrieve file during the roll forward process.
After you select Start, the utility lists each Btrieve file being rolled forward and specifies the number of logged entries for each file.
The Roll Forward utility displays a screen similar to that shown in Figure 27. The number of logged entries is shown to the left of the filename.
Figure 27
Roll Forward Utility: Roll Forward List Screen
When using NetWare Btrieve's logging feature and the Roll Forward utility, consider the following:
NOTE: If you want to switch to a different version of NetWare Btrieve, or you want to change the index balancing setting, first create a backup of the Btrieve files to be logged and then delete the corresponding log files.
This section includes instructions for handling data and log files so you can restore a lost or corrupted logged Btrieve file. It includes the following subsections:
The following procedure explains how to handle a Btrieve file called X.BTR to prepare it for logging.
Make a copy of the Btrieve file X.BTR called (for example) X.BAK.
For additional information about this process, see the section Backing Up Data Files.
Turn on the logging feature.
For additional information about this process, see the section Activating the Btrieve Logging Option.
After you have enabled logging and restarted Btrieve, Btrieve writes operations to both the data file (X.BTR) and to the log file, which is called X.LOG.
NOTE: To keep X.LOG from becoming too large, you may periodically want to make a new backup copy of the logged Btrieve file. Then delete the existing X.LOG file because the new copy of X.BAK already contains all the changes to the X.BTR file that were logged in the existing copy of X.LOG. If logging is enabled, Btrieve will create a new copy of X.LOG when you next work with the X.BTR file.
If you lose a Btrieve file or if, for some reason, a data file becomes corrupted, follow this procedure to restore that file:
Copy the backup file, X.BAK, to the Btrieve file (X.BTR).
Copy the logging file, X.LOG, to a new file called (for example) X.LLL.
Use the Roll Forward utility to apply the operations logged in X.LOG to X.BTR.
For detailed information about this process, see the section Rolling Forward Items in the Queue.
If the roll forward operation is successful, proceed to Step 4. If for some reason the first roll forward procedure does not complete successfully, proceed to Step 5.
NOTE: One reason the roll forward process might fail is that Btrieve is configured differently during a roll forward operation than it is during the original logged operations.
If the roll forward operation completes successfully, follow these steps:
If the roll forward operation did not complete successfully, follow these steps: