# 迁移到 MinIO

**URL:** <https://meta.discourse.org/t/migrate-to-minio/111830>\
**Category:** Bug\
**Created:** [2019 年3 月 17 日 10:06 UTC](https://meta.discourse.org/t/migrate-to-minio/111830 "2019-03-17T10:06:21Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![zh99998](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zh99998/32/100179_2.png) [@zh99998](https://meta.discourse.org/u/zh99998)\
发布日期： [2019 年3 月 17 日 10:06 UTC](https://meta.discourse.org/t/migrate-to-minio/111830/1 "2019-03-17T10:06:21Z")

</div>

I configured minio as image upload storage, it works well for new uploads, but I can’t migrate olds into that.

```plaintext
root@9c9267547230:/var/www/discourse# rake uploads:migrate_to_s3
Migrating uploads to S3 for 'default'...
Some uploads were not migrated to the new scheme. Please run these commands in the rails console

SiteSetting.migrate_to_new_scheme = true
Jobs::MigrateUploadScheme.new.execute(nil)

```

when I execute `Jobs::MigrateUploadScheme.new.execute(nil)` first time, it takes several hours and returned some exception, but seems finally success.

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/f/af699b6d3a487c11f4fb96ccfac3b3e1a77196b4.jpeg)

I execute it second time, it returns an empty array `[]`.

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/1/c1d0a49b162fc326ecc3286cd92c95438a711eba.png)

and then I try to `rake uploads:migrate_to_s3` again, it still says `Some uploads were not migrated to the new scheme.`

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/7/47ea9e84243ff76005ca000f737bf2a7551c5675.jpeg)

---

_[View the full topic](https://meta.discourse.org/t/migrate-to-minio/111830)._
