# Error "Killed" while running rake posts:rebake

**URL:** https://meta.discourse.org/t/error-killed-while-running-rake-posts-rebake/111943
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [March 18, 2019, 4:53pm UTC](https://meta.discourse.org/t/error-killed-while-running-rake-posts-rebake/111943 "2019-03-18T16:53:37Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [March 19, 2019, 6:44am UTC](https://meta.discourse.org/t/error-killed-while-running-rake-posts-rebake/111943/6 "2019-03-19T06:44:34Z")

</div>

This evening I rebooted the host (though it’s uptime was under 2 weeks)

rebaking succeeded

```plaintext
# rake posts:rebake
Rebaking post markdown for 'default'
     2950 / 2950 (100.0%)
2950 posts done!
-------------------------

```

but, as you suggested, this didn’t bring back the images. Ill start a new thread for that.

As for this issue (not being able to rebake ~2600 posts) Ill note that this thread seems useful:

> [@My journey into a massive posts rebake job](https://meta.discourse.org/t/my-journey-into-a-massive-posts-rebake-job/84816/23):
>
> If you need to rebake all posts instantly then run bundle exec rake posts:rebake. Post.update\_all("baked\_version = NULL") will rebake 100 posts (by default) every 15 minutes.

EDIT: As for the initial issueI was trying to solve, this thread indicates that `recover_from_tombstone` is needed in addition to the rebuild, but that hasn’t worked yet.

> [@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…

---

_[View the full topic](https://meta.discourse.org/t/error-killed-while-running-rake-posts-rebake/111943)._
