> For the complete documentation index, see [llms.txt](https://docs.nodeum.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nodeum.io/data-archiving/system-reliability/backup-and-restore.md).

# Backup & Restore

### Backup - automated Execution

A backup captures the key data of the configured solution. If the system fails, you can use the backup to restore it to its previous state.

#### Components

* **Databases**: SQL and NoSQL data, including the file catalog, metadata, and task execution history.
* **S3 and Swift API keys**: Authentication credentials for S3 and Swift storage providers.
* **Task execution log reports**: Processing history for each file in each task.

<figure><img src="/files/ZzUZtLcRvkYpaPixeDOG" alt=""><figcaption></figcaption></figure>

#### How to Schedule a Backup

1. Open the **Settings** menu.
2. Navigate to the **Backup** section.
3. Click on the **+** button.
4. Then complete & save the form, here is an example:

<figure><img src="/files/AVYqnt1Fud2xcqmT8Ml1" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/JPBfSb43Y2lZjLaaqXS4" alt=""><figcaption></figcaption></figure>

There are two different types of backup available :

<table><thead><tr><th width="202">Type</th><th>Definition</th></tr></thead><tbody><tr><td>Full Backup</td><td>Backup everything every time</td></tr><tr><td>Incremental Backup</td><td>Backup only the difference since the last backup</td></tr></tbody></table>

{% hint style="danger" %}
Conduct a full backup weekly, while performing incremental backups at other times.
{% endhint %}

Different scheduling options are available :

<table><thead><tr><th width="174.33333333333331">Option</th><th width="273">Definition</th><th>Comments</th></tr></thead><tbody><tr><td>Timezone</td><td>The schedule can be defined based on a different timezone</td><td>Defined by default, it will be current system timezone</td></tr><tr><td>Recurrence</td><td>Once</td><td>Defined by default , there is no recurrence selected</td></tr><tr><td></td><td>Every</td><td>Minute - Day - Month - Year</td></tr><tr><td></td><td>Expands</td><td>Expand the scope of the recurrence</td></tr><tr><td></td><td>Count Option</td><td>Number of backup</td></tr></tbody></table>

{% hint style="info" %}
If your server fails, reinstall the Nodeum software and restore your backup to resume data management activities.
{% endhint %}

### Backup - Manual Execution

#### How to execute a backup manually?

To initiate a manual backup or restore, execute the following shell script command:

`/opt/nodeum/tools/backup_restore.sh`

```bash
nodeum#/usr/mtc/bin/backup_restore.sh param1 param2
```

**Parameter 1**: `f` for full backup or `i` for incremental backup.\
**Parameter 2**: The path where the backup will be saved or where a restore operation will occur.

If an incremental backup is requested without an existing full backup, a full backup will be performed instead. Each incremental backup adds to the existing full backup, ensuring the backup remains restorable.

Example:

```bash
$ nohup /opt/nodeum/tools/backup_restore.sh full_backup /root/nodeum_bck_2302 &
```

The `nohup` command and the `&` operator can be used to run a backup script as a background process. The output of the executed command is saved in the file `nohup.out`.

{% hint style="info" %}
The full backup overwrites the previous full backup, while the incremental backup adds only new or changed data to the folder.
{% endhint %}

#### Components Software

The Backup includes all of these components :

<table><thead><tr><th width="251">Components</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>All databases</td><td>This includes SQL and NoSQL information: file catalog, metadata, task execution history.</td><td></td></tr><tr><td>S3 - Swift API Keys</td><td>Authentication Key Credentials of S3 and Swift storage provider.</td><td></td></tr><tr><td>Data enrichment API Keys</td><td>Authentication Key Credentials of Machine Learning provider.</td><td></td></tr><tr><td>Tasks execution log reports</td><td>History of each files processed per task.</td><td></td></tr><tr><td>Licence Key</td><td>Nodeum Encrypted License Key</td><td></td></tr></tbody></table>

### Restore

#### How to execute a restore manually ?

To restore a backup, execute the following command line.

```bash
$ /opt/nodeum/tools /backup_restore.sh param1 param2
```

<mark style="color:green;">param1</mark> : r for restore

<mark style="color:green;">param2</mark> : source path where the backup is located

Example:

```bash
$ nohup /opt/nodeum/tools/backup_restore.sh restore /root/nodeum_bck_2302 &
```

The "nohup" command and "&" symbol allow running a backup script in the background. The output of the executed command is saved in a file named "nohup.out".

#### Important Note

**Temporary Folder Usage**: By default, the script utilizes a temporary folder located at `/tmp/bckp/` on the main file system for storing backups before they are moved to their final destination. You can specify a different folder as the third argument to customize this location.

Example: In this scenario, the backup will be stored in the `/nas/backupnodeum/` directory, and the system will use `/tmp/` as a temporary cache.

```bash
/bin/bash ./backup_restore.sh full_backup /mnt/MOUNT_POINTS/nas/backupnodeum
```

#### Backup Configuration

In this example, the backup will be stored in the directory `/nas/backupnodeum/`. The system will use `/mnt/CACHE/tempbck` as a temporary cache during the backup process.

```bash
/bin/bash ./backup_restore.sh full_backup /mnt/MOUNT_POINTS/nas/
backupnodeum /mnt/CACHE/tempbck
```

**Troubleshooting Backup Process Not Starting**

If your backup process does not start and the console shows a message indicating that a `backup_restore.sh` script is already running, follow these steps:

1. **Check for Running Processes:**
   * Use the command `ps -aef` to determine if another process is currently executing.
2. **Check for Lock File:**
   * It is possible that a lock file named `nodeum_bkp_lock` exists, stored in the `/tmp` directory, even if the temporary folder location has been modified.

Verify these two aspects to resolve the issue.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.nodeum.io/data-archiving/system-reliability/backup-and-restore.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.
