> 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/english/manual/maintenance/storage/migration.md).

# Moving to Another S3 Bucket

Instructions for moving MikoPBX call recordings from one S3 bucket to another

This guide describes how to move call recordings from one S3 bucket to another, for example when switching cloud storage providers. Recordings are moved without stopping the station: MikoPBX keeps uploading new files, and the call history keeps access to old recordings.

### Migration steps

1. Copy the `recordings/` directory from the old bucket to the new one. You can do this with [rclone](https://rclone.org/):

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

If the old and new buckets are hosted by different providers, you can also use `aws s3 sync` and copy the data through a local machine.

2. In "**Maintenance**" -> "**Storage**", on the "**S3 Cloud Storage**" tab, enter the new bucket settings and click "**Save**".

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FtrE5JGBgA9mm4YF7rcKn%2FS3WasabiMikoPBXEN.png?alt=media&amp;token=ff2fce41-7f1f-447c-92a7-10e5d18f5fda" alt=""><figcaption></figcaption></figure>

3. Run the copy command from step 1 again. It copies the recordings that the station uploaded to the old bucket between the first copy and the settings switch.

{% hint style="info" %}
MikoPBX uploads recordings to S3 every 5 minutes, so new files may reach the old bucket while you switch the settings.
{% endhint %}

4. Compare the number of objects in the old and new buckets. Then open the [call history](/mikopbx/english/manual/telephony/call-detail-records.md) and check that a few old recordings play back.
5. Delete the old bucket.

{% hint style="warning" %}
To be on the safe side, instead of deleting the old bucket right away, set a lifecycle rule on it that deletes objects after N days.\
\
No additional mapping between recordings and buckets is required. After the migration, retention-based deletion of recordings automatically switches to the new bucket.
{% 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/english/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.
