I was able to do a Google Takeout of my google groups, upload the .mbox files and import.
These steps were helpful to map the data/folder to an existing category, but this needs to be done in the import container, not the app container like in this writeup:
./launcher enter import
rails c
# Use the category ID shown in the URL, for example
# it's 16 when the category's path looks like this: /c/soccer/16
category = Category.find(16)
# Use the directory name where the mbox files are stored. For example,
# when the files are stored in import/data/foo, you should use "foo" as directory name.
category.custom_fields["import_id"] = "soccer"
category.save!
I already have users in Discourse that self-migrated, and so the import script failed to create contacts for them (probably not a bad thing), but the imported messages that these existing discourse users were involved with have the sender showing as system instead of their name.
Is there any way to make it map the existing users to their imported messages?
For now I undid everything by recovering from a recent backup. Ready to try again with some guidance on dealing with existing discourse users and their imported messages.
Update:
Claude helped solve the mapping of existing users, need to run this loop in the rails console, in addition to the above bit:
User.where("id > 0").find_each do |u|
email = u.email.downcase
unless u.custom_fields["import_id"].present?
u.custom_fields["import_id"] = email
u.save_custom_fields
end
end