# S3 migration issues- some images got pointed to S3, but with the wrong URL format

**URL:** <https://meta.discourse.org/t/s3-migration-issues-some-images-got-pointed-to-s3-but-with-the-wrong-url-format/40927>\
**Category:** Product Support\
**Created:** [12.Март.2016 08:49:15 UTC](https://meta.discourse.org/t/s3-migration-issues-some-images-got-pointed-to-s3-but-with-the-wrong-url-format/40927 "2016-03-12T08:49:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)\
**Post date:** [12.Март.2016 09:17:13 UTC](https://meta.discourse.org/t/s3-migration-issues-some-images-got-pointed-to-s3-but-with-the-wrong-url-format/40927/2 "2016-03-12T09:17:13Z")

</div>

> [@ckshen](#):
>
> Is there a way for me to rewrite all URLs in the DB that has the wrong URL back to the original URL?

Yes,  
`script/discourse remap https://www.hungryonion.org//hungryonionstatic.s3-us-west-1.amazonaws.com //hungryonionstatic.s3-us-west-1.amazonaws.com`

Seems like your backup is corrupted. Does it contain a file called `meta.json` ?

---

_[View the full topic](https://meta.discourse.org/t/s3-migration-issues-some-images-got-pointed-to-s3-but-with-the-wrong-url-format/40927)._
