The recommended method of using Fileshare's basic recovery logging for rollforward recovery is:
See the section Basic Recovery Logging for further details.
Fileshare can perform these actions automatically if you specify a backup directory-name in the database reference file using the /backup option. For example, the command:
Windows:
fs /d dbase.ref /backup c:\backdir
UNIX:
fs /d dbase.ref /backup /backdir
adds an entry to the database reference file called dbase.ref which specifies the backup directory as c:\backdir on Windows or /backdiron UNIX. A full path can be specified for the backup directory, otherwise paths which are not fully qualified are taken to be relative to the current directory of the Fileshare Server.
Setting a backup directory in this way causes the Fileshare Server to copy all the data files specified in the database reference file to the directory c:\backdir on Windows or /backdiron UNIX, on startup. The Fileshare Server also deletes any recovery log file(s) that it finds since this data is obsolete once the database files have been backed up.
While the Fileshare Server is active, all updates to files which have logging switched on for them are recorded in the log file as normal. The next time the Fileshare Server is restarted, it backs up the database files again and discards any log file(s). However, if it detects that the previous Fileshare Server session did not shut down successfully and a valid terminating record had not been written to the log file (for example, as a result of a system crash), then Fileshare automatically triggers the Rollforward Recovery Utility. This automatically restores the previous backup of the database files and recovers all updates to them as recorded in the log file(s). If the recovery completes successfully, the Fileshare Server starts up as normal.
It is still possible to run the Rollforward Recovery Utility manually before starting up the Fileshare Server when a backup directory is specified in the database reference file. The Rollforward Recovery Utility automatically restores the previous backup before initiating the recovery.
If you have enabled automatic database backup by specifying a backup directory, you cannot use the "/o l" option to switch logging off for any of the data files declared in the database reference file. By having logging active for every file specified in the database reference file, Fileshare can guarantee that it can recover updates to them all when it copies backed-up versions from the backup directory. If there are some files for which you do not require automatic backup, omit them from the database reference file.
If you need to back up your Fileshare files, for example as part of a system-wide backup overnight, you can use a Fileshare Manager API function to request Fileshare to shut down, back up all the database files and then restart with a fresh log file. Having done this, we recommend that you then make a permanent hard copy of the Fileshare backup directory. See the section Fileshare Manager in the chapter Advanced Operation for more information.
Example
fs /d dbase.ref /l logfile fs /d dbase.ref /backup c:\backdir fs /d dbase.ref /f c:\accounts\customer.dat fs /d dbase.ref /f c:\finance\history.dat
fs /d dbase.ref /l logfile fs /d dbase.ref /backup /backdir fs /d dbase.ref /f /accounts/customer.txt fs /d dbase.ref /f /finance/history.txt
These commands perform the following:
On startup, the Fileshare Server automatically backs up these data files in the directory c:\backdir on Windows or /backdiron UNIX. If the log file is backed-up while the Fileshare Server is active, backup files are also placed in this directory. If the Rollforward Recovery Utility is invoked, the backup files in c:\backdir on Windows or /backdiron UNIX are restored to their original directories and any updates recorded in the log file(s) are re-applied.