# Offline update

Systems without Internet access can't update Itgrix module using `/opt/itgrix_<crm>/update.sh` script. Use offline update procedure instead:

1. Download the update file onto a PC with Internet access.
2. Transfer the downloaded update file to the server where you have the Itgrix module installed.
3. Run the update.

## Download update file

### Via online interface

At <https://itgrix.ru/offline_updates/> you can get the module updates through the online interface.

<figure><img src="https://1054546226-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M-rzZJr51tgvX7eVK8M%2Fuploads%2FtP9rDj4ZpvcMvPIhkm7r%2FdwnUpd.jpg?alt=media&#x26;token=eaa8c154-54d4-4891-baf8-c57ba97c8776" alt=""><figcaption></figcaption></figure>

Select appropriate options and click "Download updates". The update file will be downloaded onto your computer.

### Using terminal

The update file can can be downloaded by making a request to `https://bx24asterisk.ru/api/v3/get_offline_update.php` with the following options:

* **`crm`** - short name of your CRM:
  * `bx` for itgrix\_bx (Bitrix24);
  * `amo` for itgrix\_amo (Kommo, former amoCRM);
* **`arch`** - short name of the processor architecture:
  * `i386` for 32-bit processors based on the architecture x86 (including i586, i686 and others);
  * `amd64` for 64-bit processors based on the architecture x86-64 (also known as x64, Intel 64, AMD64 and others);
* **`version_from`** - the currently installed version, e.g. `3.5.0`;
* **`version_to`** - target version, **not mandatory:** if not specified, the current latest version will be used; you may need to specify it if you upgrade to a supported, but not the latest version:
  * [Change log (new versions) itgrix\_bx](https://docs.itgrix.com/changelog-bx) - for Bitrix24;
  * [Change log (new versions) itgrix\_kommo](https://docs.itgrix.com/changelog-kommo) - for kommoCRM.

{% hint style="info" %}
The file size depends on the number of milestones needed to upgrade from `version_from` to `version_to`.

Archives with these intermediate versions will be included in the update file (but NOT all intermediate versions will be added, but only those necessary for a correct update).
{% endhint %}

#### Examples

Module itgrix\_bx (Bitrix24) has version 3.5.0 installed on 64-bit server, need to update **to current latest version.** Download the update, for example, using `curl`:

```bash
curl -OJL "https://bx24asterisk.ru/api/v3/get_offline_update.php?crm=bx&arch=amd64&version_from=3.5.0"
```

If you need to get an update **only to version 3.5.3**, then specify the parameter

`version_to=3.5.3`:

```bash
curl -OJL "https://bx24asterisk.ru/api/v3/get_offline_update.php?crm=bx&arch=amd64&version_from=3.5.0&version_to=3.5.3"
```

## Installing the update

After downloading the update file, you need to transfer it to the server where you have Itgrix module installed.

{% hint style="info" %}
The update file is a self-extracting archive in the form of a shell script.

Example: `itgrix_bx-amd64-update-v3.5.0_to_v3.5.3.sh`
{% endhint %}

All you need to do to install the update is run the file **as root or with sudo**:

```bash
sudo bash <path>/itgrix_bx-amd64-update-v3.5.0_to_v3.5.3.sh
```

The update process is similar to online update (via script `/opt/itgrix_<crm>/update.sh`), but does not require downloading intermediate versions and other information - everything you need is already contained in a self-extracting archive.

{% hint style="success" %}
Update completed.
{% 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.com/faq/offline-update.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.
