Improvements in dynamic dump provide greater control over immediate restore. Additionally, support has been added for sending immediate restore progress notifications to the client.
On Windows, an immediate restore of a dynamic dump by FairCom Server creates a command prompt window. To avoid this and to provide better control over the dump restore process, the launching of the dump restore process now uses the operating system's process creation function (rather than opening a shell or command prompt window).
!IMMEDIATE_RESTORE_WITH_PROGRESS
FairCom Server reads the output of the dump restore utility during immediate restore and sends progress notifications to the client that invoked the dump (if requested). To use the notification feature during an immediate restore of a dynamic dump, follow these steps:
!IMMEDIATE_RESTORE_LOGFILE
The !IMMEDIATE_RESTORE_LOGFILE option can be specified in a dynamic dump script to cause FairCom Server to write the output of the ctrdmp utility during the immediate restore to the specified file. This can be useful for troubleshooting failed immediate restores. For example, to write immediate restore output to the file ctrdmp.log in FairCom Server's working directory (in the LOCAL_DIRECTORY directory if that option is used), use this dump script option:
!IMMEDIATE_RESTORE_LOGFILE ctrdmp.log
Note that the !IMMEDIATE_RESTORE_LOGFILE option is only used by FairCom Server during the backup phase. It is ignored by the ctrdmp utility.
Developer Options
For developers who are invoking a dynamic dump and receiving notifications, the dynamic dump callback function will now receive event notifications during the immediate restore. When the user-defined dynamic dump callback function is invoked with the opcode parameter set to ctDDCBKstatus, the pdata parameter is of type pDDST. The DDST structure's phase field indicates which event occurred. The new event values for immediate restore are:
1. DDP_BEGINRESTORE: start of dump restore
2. DDP_BEGINFILE, DDP_PROGFILE, and DDP_ENDFILE events occur for each file restored from the backup.
3. DDP_ENDRESTORE: end of dump restore; pddst->errcod is zero if it succeeded or non-zero if it failed.
4. DDP_BEGINROLBAK: start of rollback to dump start time
5. DDP_ENDROLBAK: end of rollback to dump start time
6. DDP_BEGINCLNIDX: start cleaning index nodes
7. DDP_ENDCLNIDX: end of cleaning index nodes
8. DDP_BEGINUPDIFL: start of IFIL update
9. DDP_ENDUPDIFL: end of IFIL update
See ctdumpCallback() in ctree\source\ctdump.c for an example of a callback function that handles these events.
Stop when client callback function returns an error
If an error occurs in the client-side dynamic dump callback function, the server will not continue to perform the dump. In V11.2.3 and later, the logic has been modified so that any error returned by the client's dynamic dump callback function terminates the dynamic dump.
Note: This is a Compatibility Change.