# Migrar para S3 para problemas com Digital Ocean Spaces

**URL:** <https://meta.discourse.org/t/migrate-to-s3-for-digital-ocean-spaces-woes/109662>\
**Category:** Self-hosting\
**Tags:** s3\
**Created:** [Fevereiro 20, 2019, 3:54pm UTC](https://meta.discourse.org/t/migrate-to-s3-for-digital-ocean-spaces-woes/109662 "2019-02-20T15:54:27Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [Março 15, 2019, 6:03pm UTC](https://meta.discourse.org/t/migrate-to-s3-for-digital-ocean-spaces-woes/109662/23 "2019-03-15T18:03:47Z")

</div>

Wait. So now I’ve restored the site to a staging server and ran:

```plaintext
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)

```

So does that mean that it’s going to just rebake all the posts and upload them in the background?

OOH! It looks like that’s what’s happening. Maybe I’m finally going to be able to make this transition!

EDIT: This is further confused because I previously had a CDN configured. I guess I need to rebake the posts without the CDN and then do the `migrate_to_s3`?

Also, I think that there’s a bug that if you have a CDN configured and then enable the s3 CDN, Discourse thinks that assets are on the S3 CDN. No. That’s not it. It looks like having `DISCOURSE_S3_CDN_URL` defined makes Discourse point to the CDN URL for assets, but the assets aren’t there. I thought that a `rake assets:precompile` might get it, but no joy. This might need to be another topic

---

_[View the full topic](https://meta.discourse.org/t/migrate-to-s3-for-digital-ocean-spaces-woes/109662)._
