I’m trying to import some mailing list archives in mbox format from SourceForge.
I used formail to split into individual e-mail messages - this was one snag, since it caused some minor corruption in certain messages (e.g., there was no real From: address).
Fine, now I have the JSON indexes created:
-rw-rw-r-- 1 discourse discourse 192003 Jan 7 00:00 replies-index.json -rw-rw-r-- 1 discourse discourse 77279 Jan 7 00:00 topic-index.json -rw-rw-r-- 1 discourse discourse 11363 Jan 7 00:00 user-index.json
But when it starts to actually do the work:
creating forum topics /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.7/lib/patches/db/pg.rb:50:in `exec': ERROR: duplicate key value violates unique constraint "import_ids_pkey" (PG::UniqueViolation) DETAIL: Key (val)=(<email@example.com>) already exists. from /var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rack-mini-profiler-0.9.7/lib/patches/db/pg.rb:50:in `exec' from /var/www/discourse/lib/freedom_patches/active_record_base.rb:7:in `exec_sql' from /var/www/discourse/script/import_scripts/base.rb:203:in `all_records_exist?' from script/import_scripts/mbox.rb:147:in `block in create_forum_topics'