Gavin_Hudson is seeking a way to bulk import hundreds of StackOverflow posts into a Discourse-hosted forum, noting that while StackOverflow allows JSON export and Discourse has a stack_overflow.rb import script, there’s no clear self-serve guide for hosted forums. He’s unsure if the script can be used without server access or Ruby experience. rorycb suggests contacting team@discourse.org directly, as hosted environments limit user access to system-level tasks like imports. Gavin_Hudson prefers a self-serve solution for learning and cost reasons. rorycb confirms that historically, Discourse handled such tasks for hosted clients but encourages reaching out to confirm current options. pfaffman explains that if the site is empty, one can run the import script locally, create a backup, and have Discourse restore it — but this wipes existing data. For sites with existing content, the process is more complex, requiring freezing the site, backing up, importing locally, and restoring. He notes that paying for a year of business hosting may qualify for free migration assistance, or alternatively, users can post budgets in Marketplace or contact him or Literate Computing for paid services.
We have several hundred posts to migrate from StackOverflow to a category on a forum that will be hosted by Discourse. It looks like there’s an easy way to export posts from StackOverflow to JSON, which we could then convert as needed to CSV or another format.
However, I can’t find a walkthrough for how to bulk import these as topics into Discourse. Here’s what I’ve found:
Import scripts (Github) does list stack_overflow.rb. Is there a guide for how to use this? I have no experience with Ruby. Can we go this route if Discourse is hosting the forum?
It would probably be best to message team@discourse.org directly and chat with them since you’re hosted by Discourse. You have different access to the system, and there may be different options for you
Thanks for the reply. I was hoping there might be a self-serve way to bulk import topics to forums hosted by Discourse, both because it’s a healthy learning experience to know what we can do with Discourse and also to reduce the expense of asking Discourse to do this for us.
Yup, totally understand the logic. When I was hosting with them anything that required system access like imports or command line config it was done by the team. But that was a bit ago so I’ll let someone else chime in in case I am wrong. It is also still worth messaging them to discuss it as well they support folks were always quick with an answer and options when I posed questions like that.
If you pay for a year of business hosting up front, they’ll likely do it for you. If not, as you say, there is a script for that. You run that script like the others (so find any other guide for running an import script), so you’ll need a working Discourse to run the job on. After you do that, you make a backup, upload it to your site, and ask the Discourse folks to restore it.
This will erase all of your data in Discourse. If you haven’t launched your site yet, this is no problem. If you have data on your Discourse site that you don’t want to lose, then it’s a much more complicated game.
If your site has data that you want to keep it’s more difficult. You’d need to freeze the site, make and download the backup, run the script on your machine, backup and upload it to them and then have them restore it.