Importing posts from one forum to an existing discourse forum

(Dave McClure) #1

Here’s my situation:

  1. I’ve got a discourse instance up and running in a sort of beta / soft-release mode. There has about 200 active users at the moment and maybe ~ 10 posts/day
  2. Another existing forum is somewhat defunct, but has some activity still < 1 post / day

I have the basic implementation of the importer done, and I’m pretty happy with it. But I’d like to show a proof-of-concept to those who are currently active on this beta/soft-release discourse instance.

I’m thinking of starting by importing 1 topic first. This topic includes mostly partiicpants who have already created accounts on the new forum, but at least 1 user who has not:

First question: Is it possible to make users who do not already exist in the target forum staged accounts? If I do so, will that prevent them from getting digest emails until they create a real account? Are they able to choose the username they want later if they do create a proper account?

Second question: If I want to delete this topic and all its posts, is that as simple as group-selecting all the posts in the UI and deleting them? Or is there some other cleanup I should consider doing?

Assuming I get some buy-in on the initial proof-of-concept, I plan to run the full import… It’s not huge, only about 500 topics. And it looks like the base importer already handles avoiding duplicates if I want to import new content that gets created in the defunct forum later since some of that is still trickling in.

I’m planning to import everything into one ‘import’ category which is hidden from the Latest page and then manually move things to their proper place over time with help from others in the community.

Last question: Do you see any gotchas or have any concerns with the plan I’ve outlined? Other things I should watch out for?

(Sam Saffron) #2

Yes to all of that :slight_smile:

This will soft delete and is fine, unless there are thousands and thousands of topics the impact of having these extra records around in the db will be minimal.

@neil has been working on a partial importer / exporter so you probably want to review his work and join forces (look at commits this week)

(Dave McClure) #3

OK, great. I’ll take a look at how to mark the user as staged. Once that’s sorted, I’ll feel pretty comfortable with the one topic experiment.

I am keeping this importer pretty feature-light and targeted at my particular use-case, so I’m not sure how much general interest it will gather.

But once I do a little cleanup I’ll open a PR so I can better compare notes with @neil.

(Jeff Atwood) #4

(Dave McClure) #5

I think I have it working based on what I can see in the rails console, but is the staged status is visible in the UI anywhere?

(Régis Hanol) #6

It’s a boolean flag on the User model.

You’ll have to go to the user admin profile and look for the “Staged?” line

(Dave McClure) #7

Huh, I did look there but didn’t see that. Maybe I need to just need to pull the latest changes. Should have tried that first, thanks!

(Dave McClure) #8

PR for Quandora importer here: