User kodab is seeking a minimal import script to migrate data from a self-made forum to Discourse, aiming to avoid the complexity of existing scripts designed for heavier datasets. They possess a clean CSV file but prefer a simple row-by-row import. DeanMarkTaylor suggested the Zoho importer as a basic example, though kodab noted a significant disclaimer regarding its poor output quality and questioned the utility of the script. Additionally, kodab asked for guidance on directly inserting data into the Discourse PostgreSQL database.
In response, pfaffman advised that importing directly from the original database is likely more effective than using CSV files, as most forum data involves multiple entity types (users, topics, replies). pfaffman also strongly discouraged direct database manipulation, citing potential risks and recommending the use of existing scripts like vanilla_mysql.rb instead. Following this advice, kodab expressed gratitude and confirmed they are currently modifying their SQL table structure to be compatible with the vanilla_mysql.rb script.
I’m currently using a very simple self-made forum that I want to migrate to discourse. Now I can export the data from my current forum and format all the data into a clean .csv file. I wonder now, what do I need at a minimum to import the forumposts to discourse?
I’ve looked at the importscripts from phpbb, vanilla and others and noticed they are quite “heacy” for the simple .csv that I have. I just want to say hey, I want to import this post in this category from this user row-by-row without the needed for escaping or formatting something.
Is there a simple X / Y importscript to do this job that you guys know of? Thx. love
Thanks for the reaction @DeanMarkTaylor! The importscript you’re refering to has a big disclaimer tho:
###
###
### The output of this importer is bad.
###
### Improving it means getting better quality export data from Zoho,
### or doing a lot more work on this importer.
###
### Consider leaving data in Zoho and starting fresh in Discourse.
###
###
Is this script usable than?
I also have access to the postgres db from discource. Where can I insert the posts / find the categories / what do I need to insert in postgresSQL at a minimum in which rows?
Does your self-made forum store its data in a CSV file?
If not, in my experience, it’s easiest pull your data from the database, not from a CSV file. You’ve got several kinds of data, users, topics, replies (maybe categories?). Working from one of the existing scripts is probably your best bet.
Also, no, you don’t want to access the database directly as you asked here.
Thank you very mutch for your reply, very helpful. I’m going tru the vanilla_mysql.rb script at this moment and I’m modifying my sql table so it gets accepted by the imported script.