# Разворачивание бэкапа модуля

При обновлении версии модуля, с согласия пользователя создается бэкап предыдущей версии, иногда может потребоваться откатить версию на предыдущую.

Сначала нужно остановить службу модуля

```
service itgrix_bx stop 
```

По умолчанию бэкапы создаются в директории `/opt/itgrix_bx_backups/` в виде папки с названием модуля, датой, временем и версией, например `/opt/itgrix_bx_backups/itgrix_bx-20220829-173241-3.9.3`

Внутри лежат две папки `/opt/` `/etc/` , для того чтобы восстановить модуль из бэкапа нужно заменить этими папками существующие папки в директориях с модулем `/opt/itgrix_bx/` и `/etc/itgrix_bx` соответственно.

После замены файлов, на всякий случай установим владельца и группу (по умолчанию asterisk)

<pre><code><strong>chown -R asterisk. . /opt/itgrix_bx/
</strong>
chown -R asterisk. . /etc/itgrix_bx/
</code></pre>

Далее нужно очистить файл `/opt/itgrix_bx/state.json` для того чтобы модуль не начал перечитывать звонки

{% hint style="warning" %}
В версиях модуля itgrix\_bx начиная с **3.10.0** можно воспользоваться командой

`/opt/itgrix_bx/itgrix_bx --clean --cleanlist s`
{% endhint %}

```
>/opt/itgrix_bx/state.json
```

Запускаем службу модуля, возможно понадобится переавторизовать модуль на портале

```
service itgrix_bx start
```

{% hint style="info" %}
Для amoCRM процедура такая же, меняются только имена папок с `itgrix_bx` на `itgrix_amo`
{% endhint %}


---

# 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.itgrix.ru/for-admins/razvorachivanie-bekapa-modulya.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.
