Can somebody point me to information about the rebake function?
Is this something that has to be done after moving a Discourse server to a new self hosted Linux server?
Can somebody point me to information about the rebake function?
Is this something that has to be done after moving a Discourse server to a new self hosted Linux server?
Rebaking posts is typically used to reprocess a volume of posts. For example you changed your Domain name. You now have a large number of posts that link to other topics on your site. They are now broken.
So you use the appropriate rebake process command to replace the old domain name with the new one.
From my understanding since you are just moving from one server to another no rebaking should be required. You will need to update the IP address info pointing to your site in domain provider from my understanding.
The link below should help to give clarity on rebaking posts
So rebaking is basically just fancy name for search&replace?
No, you do the search and replace (if needed), and then the posts need rebaking to convert the raw changes to the cooked, display version.
I have a bit hard time understand the difference here. And I bet it comes from my WordPress/LAMP background as admin/wannabe-webmaster. I miss vital basic knowledge.
Am I understood right (not necessary technically right but end-user level right) that search/replace changes thing in database level, but it isnāt visible unless rebaking is done?
Well, I have an all knowing AI on my forum, so I asked.
I prompted in Finnish and then asked English translation. That can lead to someā¦ errors.
ā
The Search & Replace function, as the name suggests, searches for and replaces specific strings within the forum content. This can be useful, for example, when the siteās domain changes, and you need to update all old domain names with the new ones. The targets for search and replace can be links, words, phrases, or other strings.
The term Rebake refers to the process of reprocessing posts in Discourse. Rebaking occurs when posts are converted again from raw text (markdown) to finalized HTML format. This process adheres to the current settings and styling rules. The rebake process can be initiated using commands like rake posts:rebake
.
An example of such a setting is add_rel_nofollow_to_user_content
, which adds the ārel=nofollowā attribute to all external links in user-submitted content unless itās an internal link. If this setting is changed, existing posts need to be rebaked for the change to take effect in those posts.
add_rel_nofollow_to_user_content
, they will not apply to existing posts without rebaking. Applying these new settings to old posts requires rebaking them so the new rules are considered.I might understand a bit better. But I have a feeling AI wasnāt telling the whole truth here.
As one of itās function it is a specialized āsearch & replaceā. Description fits.Some plugins like affiliate require rebaking if you want the Affiliate plugin to be apply to all previous Amazon links in posts on the site that was posted prior the installing the plugin.
If the Documentation link is not correct in describing the functions clear enough. Then the team should add a direct description.
The rebake command is used for X it differs from Search & replace due to it doing Y when used to replace patterns
Now you have me curious though. So there is a built in search & replace function? And brings the question. If I edit a post is it not so to speak reprocessed? If so shouldnāt a search & replace act like an edit & save?
Is not there Because then AI hallucinate big time.
There is big risk I remember totally wrong. It was a while ago I changed domain of my own. But Iām quite sure I did search&replace. But there is equally big risk Iām mixing things of WordPress and Discourse, and/or I did actually rebaking changing all domaim references.
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:
ā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.
I reformulate my question to AI and asked is there such function than search&replace. At that point it explained how to use remap. And after that I got very similar answer than what you gave.
Leading questions are quite basic skills of manipulating AI. But then one must know at least something about topic.
But thanks! Now I understand idea and need of remap and rebake.
(We have dev and similar hereā¦ we need 101 category of Disourse tech too )
If youāre moving from discourse.org hosting to self-hosted, you need to make sure that your backup includes the uploads and attachments. Until youāve canceled your account or otherwise asked that uploads be included in the backup the backup will point to the uploads on their S3 bucket, which will be deleted soon after your account is closed.
Yes, you typically need to rebake the posts that have attachments after you restore the backup to see that the markdown messages are made into HTML that links to the images on your own server and not theirs.