> 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/archive-log.md).

# Set up the archive log

Turn on the archive log, a long-term backup of the RTU log, and check it's working.

The archive log is a long-term backup of the RTU log, kept on a separate 128 MB memory chip (124 MB usable). It holds about 20 million records: more than a year at 35 points logged every minute. To use it, you need firmware V7.19, the memory chip and an Archive Log licence. Then you turn it on in QTech Workbench.

{% hint style="info" %}
**Applies to:** XL4 Plus with the 128 MB NAND flash chip (fitted to all new Q04 processor boards from serial number 3262, May 2026), firmware V7.19, and QTech Workbench V2.16 or later. New units come with the firmware installed, the feature licensed and the archive log turned on, unless ordered without it.
{% endhint %}

Older RTUs, including XL4s upgraded to XL4 Plus, don't have the chip and can't use the archive log. Contact QTech to find out if your unit can be upgraded: QTech assesses each unit, and may recommend a replacement instead.

## 1. Check what you need

* **Firmware V7.19**, with bootloader V3.04 or V3.05. See [Upgrade to V7.19](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/update-firmware/upgrade-to-v7-19.md).
* **The memory chip.** See [Which version do I have?](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/which-version.md) If the chip isn't fitted, Archive Log doesn't appear in the licence features.
* **An Archive Log licence.** See [Licensing and features](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/licensing-and-features.md).

## 2. Turn it on

1. Connect Workbench to the RTU.
2. Click the **Archive Log** category on the sidebar menu. The page will display configuration and status information but the log may be still disabled at this stage.
3. Check the two configuration checkboxes for **Enable RTU log Backup at Startup** (set to true) and **RTU Log Backup** (set to enabled).
4. Click the **write to device** button then reboot the RTU.

![Archive Data Logging page in Workbench, with the configuration settings](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2FVAmQ28BlvQCu2s1VghDA%2Fworkbench-archive-log-config.png?alt=media)

## 3. Check it's working

Reconnect Workbench and open the **Archive Log** category. If there's data in the RTU log, you'll see it being copied to the archive, and the statistics updating. **Backup Enabled** should show as yes.

![Archive log status: used and empty space, capacity, bad block count, backup enabled and the date range](https://3621580088-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa5hMAUl7E1cWeN5Rghg0%2Fuploads%2F7UotBjDVFYAQjBoHevMZ%2Fworkbench-archive-log-status.png?alt=media)

* Logging to the Archive always lags behind RTU logging a little because a number of records are accumulated from the RTU Log (a page) before copying them to the Archive.
* The date range shows the oldest and newest records in the archive.
* **Bad block count** in Archive log indicates level of memory wear over time (a factor when using flash memory chips).
* Once the log becomes full it starts overwriting the oldest records and will continue in this manner unless it is reformatted.

## Retrieve the archive log

The archive log is too big to collect over DATRAN's normal channels or over a serial link. Retrieve it with [**XL4-Connect**](https://help.qtech.co.nz/datran/datran-telemetry/xl4-connect.md), a QTech application that connects to the RTU over a LAN (local area network) using HTTP. It works over a broadband connection, or with a LAN patch cable plugged into the RTU. Usually you retrieve the whole log, or a time period you're interested in. See [Install and connect](https://help.qtech.co.nz/datran/datran-telemetry/xl4-connect/install-and-connect.md) and [Download the archive log](https://help.qtech.co.nz/datran/datran-telemetry/xl4-connect/download-the-archive-log.md).

To bring the records into DATRAN's SQL database, use the [DATRAN Database Import Utility](https://help.qtech.co.nz/datran/datran-vi-scada/datran-database-import-utility.md). See [Recover logged data manually](https://help.qtech.co.nz/datran/datran-telemetry/datran-xl4-plus-rtu/data-logging/recover-logged-data.md).

## Format the archive

**Format Archive** in Workbench erases all the data in the archive. You don't need to format it just to extract records that are missing from the SQL database.

## Try it on the bench

DATRAN administrators can see the archive filling quickly with a test RTU on a LAN:

1. In Workbench, turn on archive logging and backup. Format the archive and the RTU log so both are empty.
2. In DATRAN, set up a test site on a TCP channel with a buffer size of 1000 and a maximum packet size of 15000.
3. In the site's comms object, use the TCP channel and set the datagram segment size to 1800.
4. In the site's comms hist data node, set datagram version 2, log 255 RAI points every 1 second, a request rate of 5 minutes and a request byte count of 5000. QTech tech support can provide a script to create the points.
5. Turn on DATRAN's HDI (historical data interface) and QComms diagnostics, filtered on the test site.
6. In Workbench, watch the RTU log and archive log pages.

This cuts the RTU log's capacity to about 18–20 minutes. Every 5 minutes DATRAN uploads records, and the RTU log graph shows read and unread records. The archive grows steadily.
