Data Recovery

Note: We recommend that the collector for which the data recovery is intended is in the same time zone as the server. If there is a mismatch, there is a possibility that data recovery will be incomplete.

Automatic Data Recovery

In this mode, data is automatically recovered since the last time data has been collected.

How it works:
  1. The collector determines the duration between the current time and the last time data has been written to the Historian data archive, which is stored in the LastSampleWriteTime registry key.
  2. It compares this duration with the value in the Recovery Time field specified in the collector settings.
  3. It uses the shorter duration to perform a raw data query on all the tags.
  4. It then processes the returned samples in chronological order.

For example, if the collector was stopped for 8 hours, but Max Recovery Time was 4 hours, only 4 hours of data would be recovered.

As per the recovery logic, an end-of-collection marker is placed at the point in time where the collector was stopped. This end-of-collection marker may or may not be there after the recovery is complete. As part of the recovery logic, if recovery data point time matches the timestamp of the end-of-collection marker, it is overwritten with the recovered good data.

Manual Data Recovery

In this mode, you can fill gaps in the data, but you cannot fill old data.

To perform a manual recovery:
  1. Access Historian Administrator.
  2. Select Collectors, and then select the OPC Classic HDA collector instance for which you want to manually recover data.
  3. Select Recalculate.

    The Recalculate window appears.

  4. Enter start time, end time, and other required information. We recommend that you choose small time intervals to reduce the load on the server and the collector.
  5. Select Recalculate.
The tag data is recalculated. After the manual recalculation begins, the collector recovers data of the selected tags data from the collector, and sends it to Historian between the start time and end time.

At the time of recovery, if the connection to server is lost, and if the reconnect mechanism is enabled, the collector will try to connect to the server and fetch the data once connection re-establishes.

Manual Data Recovery

Assume that the collector is connected to Historian for the first time today and the archive was created at 10 am. The user initiates manual recalculation from 1am to 2 am. For that time interval, the archives were not even created. With respect to Historian, it is old unknown data and the data write fails. If there is a data gap between 1am and 2 am, manual recalculation successfully fills the data gap.