# Backlog

Backlog is designed to prevent data disappearance in the event of long-term loss of communication with the target store. This is achieved by saving data to the local disk and writing it again after the connection is restored. The backlog mechanism is available for all store types and offers the following settings:

* **Mode**: specifies backlog mode (*None* – do not use backlog, *Cyclic* – write files to disk cyclically).
* **File Size:** specifies the maximum backlog file size (in KB) that can be saved for each time series.
* **Files Count**: specifies the maximum number of files that can be saved for each time series. When this value is reached, the files are cyclically overwritten.
* **Buffer Size**: specifies the number of samples at which the backlog file is flushed to disk.
* **Flush Interval**: specifies the interval (in seconds) after which the backlog file is flushed to disk.

By default, the backlog is saved in the following directories:

* **Windows**: %ProgramData%\Monokot\Mos\Backlog\ (C:\ProgramData\Monokot\Mos\Backlog)
* **Linux**: /usr/share/Monokot/Mos/Backlog/

{% hint style="info" %}
Please note that these directories are hidden file system directories
{% endhint %}

You can change the backlog directory in the server [<mark style="color:blue;">startup settings</mark>](/basics/startup-parameters.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.monokot.io/time-series-and-stores/stores/backlog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
