> For the complete documentation index, see [llms.txt](https://help.qtech.co.nz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/data-logging/recover-logged-data.md).

# Recover logged data manually

Copy the RTU log to a laptop or USB drive on site, and import it into the DATRAN database.

If DATRAN can't reach a site for a long time, you can copy the RTU log on site with QTech Workbench, then import it into DATRAN's SQL database with the DATRAN Database Import Utility. Only do this when the normal comms will be down for a long time: normally DATRAN collects the log itself.

{% hint style="info" %}
**Applies to:** XL4 Plus, firmware v7.x. Copying to a USB drive needs firmware V7.18 or later. The archive log (V7.19) is retrieved with [XL4-Connect](https://help.qtech.co.nz/datran/datran-telemetry/xl4-connect.md) instead.
{% endhint %}

## What you need

* The latest QTech Workbench, and a USB Type A to B cable
* The latest [DATRAN Database Import Utility](https://help.qtech.co.nz/datran/datran-vi-scada/datran-database-import-utility.md), currently V1.04. Recent versions read logs from firmware V7.18 and later (database V3), and import large archive files faster.
* Logon credentials for the DATRAN SQL database

## Ways to retrieve the log

| Method    | Firmware       | How                                                                                                                                                                                      |
| --------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Serial    | All v7.x       | Workbench copies the log to the laptop over the USB cable                                                                                                                                |
| USB stick | V7.18 or later | Workbench tells the RTU to copy the log to a USB drive in the RTU. This is faster.                                                                                                       |
| HTTP      | V7.19          | XL4-Connect, over a LAN. Also retrieves the archive log. See [Set up the archive log](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/data-logging/archive-log.md). |

## Copy the log with Workbench

1. Connect the USB cable to the RTU's **CNFG** port, open Workbench and click **Connect**.
2. Go to **Data Logging** in the menu tree.
3. Copy the log:
   * **V7.17 and earlier:** click **Read Datalog**, and save the file.
   * **V7.18 and later:** click **Download to PC** and save the file, or insert a USB drive in the RTU and click **Download to USB**.

![RTU Data Logging page in Workbench (V7.18 and later), with Download to PC, Download to USB and Format Database](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2Fegr59mN3jPb0BJT79N4v%2Fworkbench-rtu-log-status.png?alt=media)

Copying the log doesn't erase it. Don't click **Format Database** unless you mean to erase the log.

## Import it into DATRAN

Use the DATRAN Database Import Utility to import the file into the SQL database. It can also export the log to a CSV file, so you can check or change it in a spreadsheet before you import it. See [Import an XL4 Plus RTU log](https://help.qtech.co.nz/datran/datran-vi-scada/datran-database-import-utility/import-rtu-log.md).
