> 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/replication.md). Agents can also search and read this documentation through its [MCP server](https://documentation.atempo.com/~gitbook/mcp).

# Replication

## About replication

You can replicate a Lina server A to another Lina server B. This way, data from the primary server is continuously replicated to the secondary server to secure your Lina storage space. This guarantees full data recovery if the primary Lina server becomes unreachable.

If server A fails, its agents' backups are not redirected to server B. However, since replication from server A to server B has secured server A's blocks and metadata, you can rebuild server A from server B. You can also restore agents directly from server B, using the advanced restore feature.

### Global replication or selective replication

Lina offers two types of replication:

* **Global replication**, which replicates the entire server, meaning both the backed-up data blocks of all agents, the metadata, and the server's backup configuration, to another Lina server.
* **Selective replication**, which only replicates the backed-up data of the agents you have chosen. Selective replication is tied to strategies. It offers the ability to partially replicate your Lina data, and to distribute replicated data across different servers.

Global replication takes precedence over selective replication: if you enable global replication, selective replication becomes unusable.

> **Note**: If you want to be able to use the DRP (disaster recovery plan) feature that lets you turn the primary server into a secondary server, choose global replication rather than selective.

### Supported configurations

Lina supports the following replication configurations:

**Simple replication**

Simple replication is the basic replication configuration (<mark style="color:blue;">Image 42</mark>). Use this configuration to:

* Protect the server.
* Ensure the availability of server A's backups from server B.
* Perform a DRP procedure that turns the secondary server (target or destination) into the primary server in the event of permanent loss of the primary server (source).\
  DRP is only available with **global replication**, when all agents are replicated.

<figure><img src="https://292508252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGys70amxdMB0xUstypXG%2Fuploads%2FqL4RyGIUezSviK617rCT%2Fimage.png?alt=media&amp;token=11dbfcf2-d276-4aa4-aa14-1daecbd1388a" alt=""><figcaption><p><strong>Image 42</strong>: Simple replication</p></figcaption></figure>

**Hierarchical replication**

Hierarchical replication is customizable and scalable, and can therefore fit specific topologies (<mark style="color:blue;">Image 43</mark>).

* Use this configuration to:
  * Protect the server.
  * Ensure the availability of downstream servers' backups from upstream servers.
  * Account for remote site/office (ROBO) infrastructures.

> **Note**: Make sure the bandwidth available between sites provides an adequate transfer rate.

<figure><img src="https://292508252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGys70amxdMB0xUstypXG%2Fuploads%2FTcVmAPOYJGj9CZE2gVKU%2Fimage.png?alt=media&amp;token=1085acf5-6451-455f-ab6e-f45717f6dd91" alt=""><figcaption><p><strong>Image 43</strong>: Hierarchical replication</p></figcaption></figure>

**Bidirectional replication**

Bidirectional replication is equivalent to simple replication in both directions (<mark style="color:blue;">Image 44</mark>). Agents backed up on either of the two servers are replicated to the other. If one of the two servers fails, all agents can still restore their data.

Note that you cannot combine bidirectional replication with hierarchical replication. Indeed, if you configure two servers that are part of a hierarchical configuration as bidirectional replication servers, a loop detection mechanism will separate the bidirectional replication servers from the rest of the hierarchical configuration.

* Use this configuration to:
  * Protect the server.
  * Improve availability and fault tolerance.
  * Ensure the availability of server A's backups from server B and server B's backups from server A.
  * Enable static load balancing across both servers.

<figure><img src="https://292508252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGys70amxdMB0xUstypXG%2Fuploads%2FT9he0OV6WDAAoGGg56wy%2Fimage.png?alt=media&amp;token=529d69e8-7a42-4b58-a50c-61bf947a7ac1" alt=""><figcaption><p><strong>Image 44</strong>: Hierarchical replication</p></figcaption></figure>

### Prerequisites

Make sure you have installed a Lina server on all machines you want to use as a replication destination.

* The Lina version must be identical between the source server and the destination server.
* The destination server's storage space must be at least equivalent to that of the source server in the case of global replication, and sufficient to accommodate the replicated agents in the case of selective replication.

## Configuring replication

To configure replication, you must create a replication destination on the source server.

* For global replication, only **one replication destination** can be used, since all data is replicated to a single server. However, a server can be the destination for multiple source servers.
* For selective replication, you can create a **separate replication destination per tenant**. There may therefore potentially be multiple destinations for the same source server. However, a given agent can only be replicated to one destination.

Depending on the replication type, use the following procedure: **Creating a global replication destination** (the entire server is replicated) or **Creating a selective replication destination** (you choose which agents are replicated via the strategy).

For selective replication, multiple replication destinations can be created.

> **Note**: Replication of the source server starts as soon as the replication destination is created and accepted by the destination server. Make sure the timing of the replication launch is appropriate before creating the replication destination.

> **Note**: For a multi-server configuration, you must use another master server as the destination server, whether for global or selective replication.

### Retention of duplicated data

From the moment a replication destination has been created on a server, strategies display an additional setting for the retention of replicated data. This setting's value defaults to the same as the primary data's retention. However, you can change it if needed.

> **Note**: As a reminder, changes are only possible for strategies you created yourself. Predefined strategies cannot be changed.

### Creating a global replication destination

Adding a global replication destination involves two steps:

* **Step 1**: Creating a replication destination on the source server
* **Step 2**: Accepting the replication request on the destination server

#### Step 1: create a replication destination

1. Log in to the administration interface of the server to replicate (source server) as Superadmin.
2. Choose the **All tenants** view.
3. Select **Server > Structure > Replications**.
4. Click **the button** ![](https://292508252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGys70amxdMB0xUstypXG%2Fuploads%2Fgit-blob-441a81d028ff66cc809bee0b201c6929c2e6b4b6%2Fimage%20\(21\).png?alt=media) located at the top of the `Replication destinations` view.
5. **Enter these settings**:
   1. **Name**: Name of the new destination, as it will be displayed in the Lina Administration Console.
   2. **Status**: Click Enabled.
   3. **Destination**: Name of the server you want to replicate to.
   4. **Port**: Web administration port of the target server (default 8181).
6. (Optional) **Enable** the `Use a proxy` toggle if you need to communicate with the target server through a proxy.
   * **Proxy server**: Hostname of the proxy server to use.
   * **Port**: Proxy server port to connect to.
   * **Proxy user**: Username if required by the proxy settings.
   * **Password**: User's password if required by the proxy settings.
7. **Click** `Create`.\
   The source server is waiting for acceptance from the destination server to finalize the creation of the replication destination.

   <div align="left"><figure><img src="https://292508252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGys70amxdMB0xUstypXG%2Fuploads%2Fgit-blob-d4c8706b15c296f66eba0cf2a9e6e125924875e2%2Fimage%20(3).png?alt=media" alt="" width="532"><figcaption><p>Source server</p></figcaption></figure></div>

#### Step 2: accept the replication request on the destination server

1. Open the administration interface of the **destination server** as Superadmin and select **`Server > Replications`.**\
   In the Replication Destination window, click the **Requests** button and accept the replication request.\
   For a multi-server configuration, you must accept the request for each node.\
   Alternatively, you can check **Automatically accept replication requests** so you no longer need to perform this step in the future.
2. A green checkmark now appears in the ***source server***'s interface next to the created destination.
3. On the ***destination server***, replicated tenants appear with a star.

### Creating a selective replication destination

Adding a selective replication destination involves three steps:

* **Step 1**: Creating a replication destination on the source server
* **Step 2**: Accepting the replication request on the destination server
* **Step 3:** Associating the replication destination with a strategy

#### Step 1: create a replication destination

1. Log in to the administration interface of the server to replicate (source server) as Superadmin or an Admin with rights to view/create/modify/delete replication.
2. Choose the **tenant** in which the agents to replicate are located.
3. Select **Server > Structure > Replications**.
4. Click **the button** ![](https://292508252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGys70amxdMB0xUstypXG%2Fuploads%2Fgit-blob-441a81d028ff66cc809bee0b201c6929c2e6b4b6%2Fimage%20\(21\).png?alt=media) located at the top of the `Replication destinations` view.
5. **Enter these settings**:
   1. **Name**: Name of the new destination, as it will be displayed in the Lina Administration Console.
   2. **Status**: Click Enabled.
   3. **Destination**: Name of the server you want to replicate to.
   4. **Port**: Web administration port of the target server (default 8181).
6. (Optional) **Enable** the `Use a proxy` toggle if you need to communicate with the target server through a proxy.
   * **Proxy server**: Hostname of the proxy server to use.
   * **Port**: Proxy server port to connect to.
   * **Proxy user**: Username if required by the proxy settings.
   * **Password**: User's password if required by the proxy settings.
7. **Click** `Create`.\
   The source server is waiting for acceptance from the destination server to finalize the creation of the replication destination.

   <div align="left"><figure><img src="https://292508252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGys70amxdMB0xUstypXG%2Fuploads%2Fgit-blob-d4c8706b15c296f66eba0cf2a9e6e125924875e2%2Fimage%20(3).png?alt=media" alt="" width="355"><figcaption><p>Source server</p></figcaption></figure></div>

#### Step 2: accept the replication request on the destination server

1. Open the administration interface of the **destination server** and select **`Server > Replications`.**\
   In the Replication Destination window, click the **Requests** button and accept the replication request.\
   For a multi-server configuration, you must accept the request for each node.\
   Alternatively, you can check **Automatically accept replication requests** so you no longer need to perform this step in the future.
2. A green checkmark now appears in the ***source server***'s interface next to the created destination.
3. On the ***destination server***, replicated tenants appear with a star.

#### Step 3: associate the replication destination with one (or more) strategy to designate the agents to replicate

1. Open the **`Backup > Strategy`** view in the tenant where you created the replication destination.
2. Select (or create) the strategy that applies to the agents to replicate.
3. In the **Replication** setting, select the replication destination you created.
4. Click **Save**.

### Viewing replication destinations

In the source server's administration interface, select **Server > Structure > Replications**.

Replication destination settings are as follows (<mark style="color:blue;">Table 30</mark>).

<details>

<summary><strong>Name</strong></summary>

Name given to the replication destination by which it is identified on the network.

</details>

<details>

<summary><strong>Status</strong></summary>

Indicates whether the replication destination's status is \*\*Enabled\*\* or \*\*Disabled\*\*.

</details>

<details>

<summary><strong>Server</strong></summary>

Name and port number of the replication server.

</details>

<details>

<summary><strong>Usage</strong></summary>

Indicates:

* **Global** for a global replication destination, meaning all agents' data is replicated.
* **Total number of agents** for a selective replication destination, meaning only the specified agents' data is replicated.

</details>

<details>

<summary><strong>Tenant</strong></summary>

Indicates \*\*Shared\*\* for a global replication destination.

</details>

### Modifying a replication destination

1. In the Lina Administration Console, select **Server > Replications**.
2. Click the replication destination you want to modify.
3. Change the information as needed.
4. Click **Save**.

> **Note**: Some changes may trigger a full restart of replication. For example, if you change the replication server, all agents linked to that replication will be replicated from scratch to the new destination.

### Deleting a replication destination

1. Select the replication to delete from the list.
2. Click ![](https://292508252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGys70amxdMB0xUstypXG%2Fuploads%2Fgit-blob-752318bdac7fed23a205b1f2a7c2b28623fa0523%2Fimage%20\(181\).png?alt=media) and confirm the deletion.

> **Note**: When you delete a replication destination, replication to that destination stops, but the already replicated data is kept.

### Configuring hierarchical replication

To configure hierarchical replication, you must create a replication destination on each source server involved.

## Replication statistics and reports

1. Go to **Server > Statistics.**
2. Click the tile dedicated to **Replication**.
3. Alternatively, this tile is also accessible from the **Dashboard**.

Information about replication volume and lag is displayed. In the **Volume** section, you can view the replicated volume and the cumulative volume over specific periods (i.e. the previous week or month).

In the **Lag** section, you can view replication lags that occurred over specific periods (i.e. the previous week or month).

In the **Agent lag** section, you can view the number of agents for which a replication lag is recorded, and its duration.


---

# 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/replication.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.
