For what it’s worth, I’ve written a minimum viable Python script that performs simple backup of post content using the API: GitHub - jamesob/discourse-archive: Provides a simple archive of Discourse content
It’s pretty barebones, but should give someone a rough idea of how to generate a suitbable-for-public archive.