> For the complete documentation index, see [llms.txt](https://documentation.atempo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.atempo.com/lina-7.4/lina-7.4-en/administration-guide/performing-maintenance.md). Agents can also search and read this documentation through its [MCP server](https://documentation.atempo.com/~gitbook/mcp).

# Maintenance

This section details the most common maintenance operations you may need to perform when using Lina.

## Ensuring database and block storage consistency

The product's reliability depends on the consistency of its database and its block storage space. To make sure you are using a consistent system, a set of tools is provided to check, repair, and clean up your data.

If a Lina restore process fails and reports missing or corrupted blocks, your system may have hardware issues or filesystem corruption. A hard drive failure where block files are stored, or filesystem corruption, can cause blocks to disappear or become corrupted.

Therefore, make sure your system is completely healthy and that the server has enough disk space before performing the maintenance operations described in this topic. The available disk space must be at least equal to the size of your database.

### Repairing and cleaning up missing or corrupted blocks

The repair tool checks the consistency of block files and goes through the database or client streams to identify files pointing to missing or corrupted blocks. These files are considered erroneous.

If an erroneous file is still under the protection of an active agent, the file is fully sent to the server again, which allows the missing blocks to be recovered.

The repair process happens in two steps.

* The first step runs as a **background task** and does not impact production.
* The second step, however, requires **stopping the server**, which interrupts backup and restore operations for its entire duration. This duration varies depending on the size of the database to scan.

### Step 1: Run the `online_repair` command

1. Run this command in the `bin` directory of the installation directory:\
   `ade_admin`
2. Then run `online_repair`
3. Wait to receive the alarm notification in the server's administration interface indicating that the operation is complete before moving on to step 2. This can take several days depending on the speed of the storage.

> **Note**: You can exit the `ade_admin` interactive command mode while the command is running, or even stop and restart the server — this has no impact on the command, which will keep running as a background task.

### Step 2: Run the `repair TOTAL` command

1. Stop the ADE service.
2. Run this command in the `bin` directory of the installation directory:\
   `ade_server --repair TOTAL`
3. Once the repair is complete, restart the ADE service.

### Evolution of the <kbd>repair</kbd> function syntax

The <kbd>repair</kbd> function has evolved between Lina versions 7.2 and 7.3:

<table data-header-hidden><thead><tr><th width="304"></th><th></th></tr></thead><tbody><tr><td><strong>Lina 7.2 syntax</strong></td><td><strong>Lina 7.3 syntax</strong></td></tr><tr><td><code>--repair &#x3C;path></code></td><td><code>--repair FULL --dump &#x3C;path></code></td></tr><tr><td><code>--repair FULL + --repair CLEANUP</code></td><td><code>--repair TOTAL</code></td></tr></tbody></table>

Where 2 commands had to be run with Lina 7.2 and earlier to get a full repair including cleanup:\ <mark style="color:$primary;">`--repair FULL + --repair CLEANUP`</mark>\
Starting with version 7.3, the 2 commands have been combined into a single one:\ <mark style="color:$primary;">`--repair TOTAL`</mark>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.atempo.com/lina-7.4/lina-7.4-en/administration-guide/performing-maintenance.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
