In a discussion about migrating from NodeBB to Discourse, michael seeks guidance after encountering issues with the NodeBB importer script. eatcodetravel, who created the script, explains that Redis is required and outlines steps: set up a Discourse environment, configure the importer, and run it via bundle exec ruby script/import_scripts/nodebb/nodebb.rb. michael tries running it inside a Docker container, edits paths, and copies the NodeBB dump.rdb file, but fails with “No connection to db” and later a PostgreSQL authentication error. tehspaceg shares their successful experience, advising to stop Redis before replacing dump.rdb and suggesting a non-Docker dev setup per the Beginners Guide. michael remains stuck, suspecting Redis isn’t loading the dump, and struggles to stop Redis in Docker. Falco clarifies that the importer must be run outside Docker, in a native dev environment — which michael confirms was the missing piece. The thread highlights that Docker isn’t suitable for this migration and emphasizes proper Redis state management and environment setup.
I need a bit of guidance on migrating from nodebb to Discourse. I saw this thread and saw that @eatcodetravel created the script. I’m failing to understand how these scripts are executed. Do I need to install Redis on the server that Discourse is running as well for the import?
You need redis to run discourse. The nodebb importer is only available if you use redis as your nodebb database. Here is how I would do the migration.
Setup a discourse environment (it can be your machine or an instance in the cloud)
Change the nodebb importer configuration (take a look at the code, there’s comments on what you need to replace)
Run the importer with bundle exec ruby script/import_scripts/nodebb/nodebb.rb from the discourse folder
(Optional) make a backup of discourse and restore it where you need it
The importer will connect to your nodebb redis database and copy everything over discourse, the time it takes is related to the amount of data you have. Also, you need to wait for discourse to finish processing jobs before you do the backup, go to /sidekiq route as an admin and you will see the pending/completed jobs
I have Discourse running via Digital Ocean + Docker. I edited script/import_scripts/nodebb/nodebb.rb within the container and edited ATTACHMENT_DIR to include the directory where I have nodebb. I put the nodebb directory inside the container as well.
I neglected to write down the actual paths to files, I just had those notes from when I did it.
Are you using a dev environment outside of the Docker image? it might make it easier ensure redis is stopped when you replace the dump.rdb file.
Edit: I wrote this before finishing coffee. So the reason I suggest that you need to have redis stopped is that I don’t think it will read from the dump file until after it has been stopped (redis stores the database in memory and periodically writes to the dump.rdb file)