What is rebaking and is it necessary when moving a server?

There is a command-line way to “remap” certain strings in the database. But there is no feature named ‘find and replace’ in Discourse. So yeah, I think your AI is hallucinating and confusing the situation.

Technically, in the ‘posts’ database table, the post content is stored in two ways:

  1. ‘raw’ - this is the markdown which was entered by the user
  2. ‘cooked’ - this is the HTML version of the content, which we render onto the screen

“baking” a post is the process of converting from raw → cooked. We do it every time a post is created/edited, and when ‘rebaking’.

One thing the ‘baking’ process does is to generate ‘optimised’ versions of uploaded images. To save space, those optimised versions are not included in backups. So if you restore a backup, and do not rebake, then you will see broken images on your site. Rebaking is required in order to regnerate those optimised images. Discourse will take care of that automatically when you restore a backup.

4 Likes