> For the complete documentation index, see [llms.txt](https://docs.mikopbx.com/mikopbx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mikopbx.com/mikopbx/manual/maintenance/storage/migration.md).

# Переезд на другой S3 бакет

Инструкция по переносу записей разговоров MikoPBX из одного S3-бакета в другой

В данной инструкции описан перенос записей разговоров из одного S3-бакета в другой - например, при смене провайдера облачного хранилища. Записи переносятся без остановки станции: MikoPBX продолжает выгружать новые файлы, а история разговоров сохраняет доступ к старым записям.

### Порядок переезда

1. Скопируйте каталог `recordings/` из старого бакета в новый. Это можно сделать утилитой [rclone](https://rclone.org/):

```bash
rclone sync old:bucket/recordings new:bucket/recordings
```

Если старый и новый бакеты находятся у разных провайдеров, можно также воспользоваться `aws s3 sync`, скопировав данные через локальную машину.

2. В разделе "**Обслуживание**" -> "**Хранилище**" на вкладке "**Облачное хранилище S3**" укажите параметры нового бакета и нажмите "**Сохранить**".

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FrzUhS8bveVIzSFB9xMPk%2FS3DOMikoPBXCredentials-RU.png?alt=media&amp;token=1d063513-9b7f-4c7e-b586-6580af558191" alt=""><figcaption><p>Пример заполненных данных для подключения S3</p></figcaption></figure>

3. Повторно выполните команду копирования из шага 1. Она докопирует записи, которые станция успела выгрузить в старый бакет между первым копированием и переключением настроек.

{% hint style="info" %}
MikoPBX выгружает записи в S3 раз в 5 минут, поэтому за время переключения в старый бакет могут попасть новые файлы.
{% endhint %}

4. Сверьте количество объектов в старом и новом бакетах. Затем откройте [историю звонков](/mikopbx/manual/telephony/call-detail-records.md) и проверьте воспроизведение нескольких старых записей.
5. Удалите старый бакет.

{% hint style="warning" %}
Чтобы подстраховаться, вместо немедленного удаления настройте на старом бакете lifecycle-правило, которое удалит объекты через N дней.\
\
Дополнительно настраивать mapping записей и бакета не требуется. После переезда удаление записей по сроку хранения автоматически начнёт работать с новым бакетом.
{% endhint %}


---

# 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://docs.mikopbx.com/mikopbx/manual/maintenance/storage/migration.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.
