Here below are from Vanilla and imported to Discourse
AI-generated summary
Christian_Suntay is experiencing issues with post reply counts after importing data from Vanilla to Discourse using the bulk importer. They are concerned about the lack of replies and the long-running rake import:ensure_consistency task, which is taking hours and causing SSH unresponsiveness. Justin and pfaffman explain that the process can take a very long time (e.g., 33 hours or more), and there is no progress bar. They suggest checking if the PostTiming table is growing as a sign of progress and confirm that the data will be included in backups. They clarify that PostReply is not generated during import and is only used for direct replies. Christian also asks if rake import:ensure_consistency needs to be run after restoring a backup, and is reassured that it’s not necessary once the tables are updated. Christian_Suntay shares screenshots of the issue, and justin and pfaffman provide guidance throughout the discussion.
Did you use the bulk importer? If so you’ll need to run rake import:ensure_consistency to generate those stats.
Yes Justin. I have used bulk importer (vanilla)
Will try that now. Thanks!
Any idea when using the rake import:ensure_consistency after a few minutes it makes the ssh unresponsive?
I already make the
ServerAliveInterval 3600 just to make sure it wont die.
How long should rake import:ensure_consistency take for 20million datas
A very long time. If it can process 10K per minute, you’re looking at 33 hours. It could easily be 10X that long.
EDIT: Beware: This assumes that I can do arithmetic with a calculator.
Thanks Jay for clarifying!
It’s ok Jay - math is hard. ![]()
it will sit like this for hours?

no indication that it is still running ![]()
There’s not a progress bar, no. As Jay said it will likely run for quite a long time. Give 24hrs and check back.
You could in another window do something like PostTiming.all.count in a rails console. If it’s getting bigger then you’d know that it was getting bigger. Maybe. But I didn’t look at what it’s actually doing.
sir one last question. when i admin/backup and restore it will it be counted to the backup?
It’s on the database, so it will be included.
Also you want to look at /sidekiq and make sure that all of those jobs are done before moving to production
Thanks Jay. So does it mean when I restore the back up into a new server do i need to run the rake import:ensure_consistency? because it includes an action of “updating” after insert
I don’t believe so. Once those tables are updated they’ll be in the database.
Great! thanks Jay and the swift response of the discourse team!
If you’re importing I’m not 100% sure a PostReply is generated. I believe that’s for direct replies to specific posts, like mine to yours.




