> 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/tina-4.9.5/tina-4.9.5-en/administration-guide/restore/bmr-linux-rear.md). Agents can also search and read this documentation through its [MCP server](https://documentation.atempo.com/~gitbook/mcp).

# BMR Linux (REAR)

## Generating the recovery image (ISO)

The following command generates the disaster recovery ISO image. It must be run as **root**:

```bash
$TINA_HOME/Tools/ReaR/usr/sbin/rear -v mkrescue
```

The image is created at:

```
$TINA_HOME/Tools/ReaR/var/lib/rear/output/rear-<nom_de_la_machine>.iso
```

{% hint style="info" %}

### ℹ What does the ISO image contain?

The ISO image is a minimal, self-contained Linux environment that contains:

* The kernel and initrd required to boot on a bare machine.
* The network configuration and the settings for reconnecting to the Tina server.
* The ReaR recovery script that will recreate the partitions and file systems and restore the data.

**The ISO image does not contain the data**: this is restored from the Tina server.
{% endhint %}

## Restore procedure

### Booting on the ISO image

Mount the ISO image on the target machine (ISO on network storage, USB drive, or virtual drive), then boot on it.

{% hint style="info" %}

#### ℹ VMware virtual machines

If the VM systematically boots on the hard disk before the ISO:

1. In the VMware settings, force the boot to the BIOS (*Force BIOS Setup* option).
2. In the BIOS, move *Removable Devices* to the top of the boot priority.
3. Save and exit the BIOS: the VM will restart on the ISO.
   {% endhint %}

### Connecting to the recovery environment

Once the image has booted, connect as **root** (no password is required: this is an isolated recovery environment).

{% hint style="warning" %}

#### ⚠ SSH connection — fixing permissions

The recovery environment has a permissions bug: root's `~/.ssh` directory is created with `drwxrwxr-x` rights, which the SSH daemon refuses.

Before any SSH connection, run from the console:

```bash
chmod 755 ~/.ssh
```

The SSH connection then works normally.
{% endhint %}

### Launching the restore

From the root session (console or SSH), run:

```bash
rear -v recover
```

The recovery process runs through several phases:

<table><thead><tr><th width="313.66668701171875">Phase</th><th>Description</th></tr></thead><tbody><tr><td><strong>1. Rebuilding the partitioning</strong></td><td>ReaR recreates the partition scheme identical to the original</td></tr><tr><td><strong>2. Creating the file systems</strong></td><td>The file systems are reformatted (ext4, xfs, etc.)</td></tr><tr><td><strong>3. Tina authentication</strong></td><td>Entry of a Tina account authorized to launch restores</td></tr><tr><td><strong>4. Restoring the data</strong></td><td><code>tina_restore</code> is run automatically to restore all data</td></tr><tr><td><strong>5. Finalization</strong></td><td>Bootloader configuration; the machine is ready to reboot</td></tr></tbody></table>

#### Tina authentication

During the process, ReaR asks for the credentials of a Tina user authorized to launch restores:

```
Enter Tina username: admin
Enter Tina password: ********
```

{% hint style="info" %}

#### ℹ Delegating restores

The account used does not have to be the administrator account.

You can create dedicated Tina users with only restore rights, which lets you delegate recovery operations to an operations team without giving them full administrator access to Tina.
{% endhint %}

### Final reboot

Once the restore is complete, ReaR states this explicitly. All you then need to do is reboot:

```bash
reboot
```

The system reboots on the restored disk and returns to the exact state it was in at the time of the last Tina backup.

## Test guide

The following procedure lets you validate the entire BMR cycle in an isolated test environment.

### Step 1 — Create the test VM

* Clone a Rocky Linux 8.9 VM (or equivalent RHEL 8).
* Check that the VM has at least 20 GB of disk and 2 GB of RAM.

### Step 2 — Install and configure the Tina agent

* Install the Tina agent and register it on a Tina server.
* Configure a backup strategy covering the root `/`.
* Run a first full backup and check that it succeeds.

### Step 3 — Install ReaR and its prerequisites

#### Install mkisofs

```bash
dnf install mkisofs
```

#### Install Isolinux

Download syslinux 6.03:

```
https://www.kernel.org/pub/linux/utils/boot/syslinux/
```

Extract into `/opt`:

```bash
tar -xzf syslinux-6.03.tar.gz -C /opt
```

#### Configure `local.conf`

Configure the file:

```
$TINA_HOME/Tools/ReaR/etc/rear/local.conf
```

adapting in particular:

* `TINA_HOME`
* `ISO_ISOLINUX_BIN`
* `USE_DHCLIENT=No`

### Step 4 — Generate the ISO image

```bash
$TINA_HOME/Tools/ReaR/usr/sbin/rear -v mkrescue
```

Check that the following is created:

```
$TINA_HOME/Tools/ReaR/var/lib/rear/output/rear-<machine>.iso
```

### Step 5 — Simulate total loss and restore

* Delete the contents of the VM's system disk (or create a blank VM of the same type).
* Mount the ISO and boot on it.
* Connect as root (console or SSH after `chmod 755 ~/.ssh`).
* Run `rear -v recover` and follow the instructions.
* Enter the Tina credentials.
* After the restore, reboot and check the integrity of the system.

## Command summary

<table><thead><tr><th width="231">Action</th><th>Command</th></tr></thead><tbody><tr><td><strong>Generate the ISO image</strong></td><td><code>$TINA_HOME/Tools/ReaR/usr/sbin/rear -v mkrescue</code></td></tr><tr><td><strong>Launch the restore</strong></td><td><code>rear -v recover</code></td></tr><tr><td><strong>Fix SSH permissions</strong></td><td><code>chmod 755 ~/.ssh</code></td></tr><tr><td><strong>Check Isolinux</strong></td><td><code>ls /opt/syslinux-6.03/bios/core/isolinux.bin</code></td></tr><tr><td><strong>Install mkisofs</strong></td><td><code>dnf install mkisofs</code></td></tr></tbody></table>

## Open items and improvements to plan

<table><thead><tr><th width="167.3333740234375">Ref.</th><th width="312.3333740234375">Description</th><th>Priority</th></tr></thead><tbody><tr><td><strong>OPEN-1</strong></td><td>Enable <code>manage_holes=yes</code> in Tina by default to handle sparse files (<code>lastlog</code>) without manual exclusion</td><td>High</td></tr><tr><td><strong>OPEN-2</strong></td><td>The Tina setup should automatically set <code>TINA_HOME</code> in <code>local.conf</code> during installation</td><td>Medium</td></tr><tr><td><strong>OPEN-3</strong></td><td>Support for <code>systemd-networkd</code> by ReaR (<code>USE_DHCLIENT</code> currently hard-disabled)</td><td>Low (upstream ReaR)</td></tr><tr><td><strong>OPEN-4</strong></td><td>Fix the permissions of <code>~/.ssh</code> in the recovery image (<code>drwxrwxr-x</code> → <code>drwx------</code>)</td><td>Low</td></tr></tbody></table>


---

# 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/tina-4.9.5/tina-4.9.5-en/administration-guide/restore/bmr-linux-rear.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.
