Users discuss rebaking posts in Discourse after installing plugins or restoring backups. bekircem installed the spoiler alert plugin and found old posts didn’t render spoiler tags, requiring a full rebake via rake posts:rebake — a resource-intensive process for 300k posts. After high CPU load, gerhard suggested flushing Redis to stop jobs, but bekircem reported the process persisted; gerhard then advised killing the rake process directly. bekircem later asked how to rebake only posts with [spoiler] tags, and gerhard recommended rake posts:rebake_match["[spoiler]"] and linked to meta.discourse.org. Gulshan_Kumar faced broken images after restoring a backup, wondering if rake posts:rebake equals rebuilding — codinghorror confirmed rebaking helps if URLs changed, but gerhard clarified that missing thumbnails stem from disabled include thumbnails in backups, which triggers background rebaking. Gulshan_Kumar enabled the setting, re-backed up, and restored — yet some images remained broken even after rebuilds, with rebaking still slow on 8 vCPUs/52GB RAM. gerhard also suggested rake posts:rebake_uncooked_posts to expedite image recovery.
I applied that commands and after close terminal but it seems working now on the terminal with htop command.
bin/rake posts:rebake
But the server is high load because of that. There 300.000 post. I think it will take a long time. When this is done, spoiler tag for old post work correctly, right?
How can i cancel that rake process. Server is high cpu load because of that.
Something like rake posts:rebake_match["\[spoiler]"]should work. You’ll have to try it out yourself…
Read the post about rebaking I linked above. The documentation is really good!
The include thumbnails in backups site setting lets you configure if backups should include thumbnails or not. The setting defaults to off and leads to smaller backups. When you restore such a backup you will see the following message in the log:
Posts will be rebaked by a background job in sidekiq. You will see missing images until that has completed.
You can expedite the process by manually running rake posts:rebake_uncooked_posts
Thanks for the head up. Actually, I was surprised my original disk usage was near 34GB out of 40GB. but I was getting backup file of only 2GB. I have enabled this settings now, and I will take backup again and then I will proceed to restore.