# Migrate\_to\_S3 Fails on Rebake

**URL:** https://meta.discourse.org/t/migrate-to-s3-fails-on-rebake/151486
**Category:** Self-hosting
**Created:** [14 במאי,‏ 2020,‏ 1:08pm UTC](https://meta.discourse.org/t/migrate-to-s3-fails-on-rebake/151486 "2020-05-14T13:08:45Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![evenif](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/evenif/32/207869_2.png) [@evenif](https://meta.discourse.org/u/evenif)
#### Post date: [1 בפברואר,‏ 2021,‏ 8:46am UTC](https://meta.discourse.org/t/migrate-to-s3-fails-on-rebake/151486/12 "2021-02-01T08:46:34Z")

</div>

@markersocial Thanks for your help, I think my issue because I used S3 service before (from year 2005), then local storage, and then use S3 storage again. Now when I want to uploads my local images to S3 caused a lot of trouble. My S3 bucket does’t have `/uploads/default`.

After `uploads:migrate_to_s3` I found some `/images/transparent.png` broken images, When I use this `rake uploads:recover_from_tombstone`

> [@Old image uploads become broken images](https://meta.discourse.org/t/old-image-uploads-become-broken-images/47236/2):
>
> Lest anyone thinks that this query went unanswered, many thanks to @zogstrip for solving this. It seems that Discourse got confused about whether those uploaded images were being used and moved them for subsequent deletion. Though you will probably never need it, the fix went something like this: # copy the "deleted" images from their to-be-deleted staging area cd /var/discourse ./launcher enter app rake uploads:recover\_from\_tombstone # rebake to see that it doesn't happen again rake posts:re…

I got

> Warning /t/topic/6216/4 had an incorrect 338c64ada8cbb0fb99bff79e833a4cc492ead00c should be c95e4b7c08702db4593332f29b40ca07fb1d9db1 storing in custom field ‘rake uploads:fix\_relative\_upload\_links’ can fix this

then rake aborted and:

> rake uploads:fix\_relative\_upload\_links --trace  
> \*\* Invoke uploads:fix\_relative\_upload\_links (first\_time)  
> \*\* Invoke environment (first\_time)  
> \*\* Execute environment  
> \*\* Execute uploads:fix\_relative\_upload\_links  
> **Upload not found /uploads/files/general/111/cours-offerts.pdf in Post 23033 - /t/certificate-technique-de-soudage-college-mathieu/11060/1**

I’m confused now.

---

_[View the full topic](https://meta.discourse.org/t/migrate-to-s3-fails-on-rebake/151486)._
