# How to Migrate Data to Stook Using Rclone

Use **Rclone** to migrate objects from any S3-compatible storage to **Medianova Stook Object Storage**. Rclone is a good fit for large transfers and resumable copies.

***

### Prerequisites

* Rclone installed on your machine\
  Download: <https://rclone.org/downloads/>
* Source S3 credentials:
  * **Endpoint URL**
  * **Access Key**
  * **Secret Key**
  * **Bucket name** (and optional prefix)
* Stook credentials:
  * **Server** (endpoint, e.g. `https://xxxxx.mncdn.com`)
  * **Access Key**
  * **Secret Key**
  * **Bucket name**

{% hint style="warning" %}
Credentials are private. Do not share them.
{% endhint %}

{% hint style="info" %}
Need keys or endpoint details? Start with [Getting Started with Stook](/products/object-storage-stook/getting-started-with-stook.md) and [Manage Access Keys](/products/object-storage-stook/manage-access-keys.md).
{% endhint %}

***

### Migration steps

{% stepper %}
{% step %}
**Configure your source remote**

Run the config wizard:

```bash
rclone config
```

Create a new remote. Use the `s3` backend. Enter your source endpoint and credentials.
{% endstep %}

{% step %}
**Configure your Stook remote**

Run `rclone config` again. Create a second remote, for example `stook`.

Use the `s3` backend. Set your Stook endpoint (for example `https://xxxxx.mncdn.com`). Enter your Stook Access Key and Secret Key.

{% hint style="info" %}
If you see signature or redirect errors, enable **path-style addressing** for the Stook remote. In Rclone, this is usually `force_path_style = true`.
{% endhint %}
{% endstep %}

{% step %}
**Validate connectivity**

List buckets or prefixes to confirm auth and endpoint settings:

```bash
rclone lsd source:
rclone lsd stook:
```

{% endstep %}

{% step %}
**Copy objects**

Copy a full bucket:

```bash
rclone copy source:source-bucket-name stook:target-bucket-name --progress
```

Copy a prefix only:

```bash
rclone copy source:source-bucket-name/path/to/data stook:target-bucket-name/path/to/data --progress
```

{% hint style="info" %}
Use `copy` to only add/update objects. Use `sync` to make the destination match the source (including deletions).
{% endhint %}
{% endstep %}

{% step %}
**Tune and monitor large transfers**

Increase parallelism when you need speed:

```bash
rclone copy source:source-bucket-name stook:target-bucket-name --progress --transfers 8 --checkers 16
```

Write logs for audits and retries:

```bash
rclone copy source:source-bucket-name stook:target-bucket-name --log-file rclone-stook.log --log-level INFO
```

{% endstep %}

{% step %}
**Verify migrated data**

Run a post-copy verification:

```bash
rclone check source:source-bucket-name stook:target-bucket-name
```

Rclone compares object listings and, when supported, hashes. Hash checks can vary across S3 implementations.
{% endstep %}
{% endstepper %}

***

### Troubleshooting

* **Auth error (403/401):** Re-check Access Key, Secret Key, and endpoint URL.
* **Redirect/signature mismatch:** Enable path-style addressing (`force_path_style = true`).
* **Slow transfer:** Increase `--transfers` and verify network throughput.
* **Missing objects:** Re-run `rclone copy`. It is safe and incremental.

***

### References

* [Rclone Downloads](https://rclone.org/downloads/)
* [Rclone S3 backend documentation](https://rclone.org/s3/)


---

# 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://clients.medianova.com/products/object-storage-stook/integration-and-usage-guides/how-to-migrate-data-to-stook-using-rclone.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.
