Migrate old (custom made) forum to existing Discourse

(William Di Luigi) #1

we have ran a Discourse instance that has since replaced our old forum. The old forum was custom made, so we couldn’t use an exporter/importer.

So, at the moment we have two forums: the new one (using Discourse) and the old one (in read-only mode).

How should I go on importing the old forum into the new one? I can access the old data via postgresql queries. I was thinking somethink like writing a Python script which iterates through all topics and then connects to the new forum (HTTP query) and posts each message by “impersonating” the user who originally wrote it. I guess that I would need to generate and admin API key to do that… but can I do that? (e.g. can I set a custom datetime for the post?) :confused:

Another option is to write an exporter in Python that translates our old format to a “famous” one like the Vanilla format. If you think that that’s a better option, then can you point out to me a specification of the Vanilla format?

Thank you :smile:

(Kane York) #2

Basically, you want to use the existing import scripts to write your own. Use the most recently modified ones as examples.

(William Di Luigi) #3

Sadly I don’t know Ruby. It would be awesome if I could do that in Python (using the REST API in some way).

(Kane York) #4

Unfortunately, the import scripts are the best way to create a large number of users with attached posts and stuff.

Also, you would have had to edit the scripts anyways even if you had a standard import format.

Orrrr… You could sign up for hosting and pay us to do the import :wink: