1.3 Scanning

Follow these steps to find data sets on Target Services that match the scan criteria:

  1. Call NWSMTSScanDataSetBegin to start scanning.

  2. Call NWSMTSScanNextDataSet to continue the scan

  3. Call NWSMTSScanNextDataSet to continue the backup job after cluster failover/failback, if the last successfully backed-up data set exists.

    Call NWSMTSScanDataSetEnd to prematurely stop scanning.

  4. Call NWSMTSScanDataSetEnd when all data sets have been scanned.

1.3.1 Modifying the Scan Order

  1. Call NWSMTSReturnToParent to move the scanning point.

  2. Call NWSMTSScanNextDataSet to continue the scan.

  3. Call NWSMTSCloseDataSet to close the data set's handle once scanning is complete.

    The data set's handle should not be closed until all the parent's subordinates are scanned.

The following diagram illustrates a scan order. A scan that has begun at parent A moves to parent F. After scanning child h, the engine decides it is done with parent F, and moves the scan to the next parent by calling NWSMTSReturnToParent. When the function is called, the scan is moved from parent F to parent E. When NWSMTSScanNextDataSet is called, there are no more data sets to scan in parent E so scanning continues in parent G.

Figure 1-4 Scan Order

Scan order