How can I migrate Stack Overflow data into Discourse?

I want to transfer about 1000 posts from our old Stack Overflow Enterprise instance into Discourse. Has anyone migrated Stack Overflow data into Discourse?

Is there a plugin or repo with scripts that could help facilitate this?

Hey so I’m looking to do a similar thing so I’ll wait for a more informed answer but I did find this:

This seems to suggest there is a way, would be great to get some comment on how to use it.

3 Likes

Not sure how far along you got with the above, but what I ended up doing was just using the Stack Overflow and Discourse APIs. Pulled the posts/answers I wanted from the Stack Overflow API, did some data processing/formatting and then used the Discourse API to create new posts based off the data.

Any plans to share your code? That would be super handy to many people I’m sure.

1 Like

Sure! As soon as I finish our migration, I’ll make sure to come back and post a python script that streamlines the Stack Overflow Post to Discourse Post migration. Should be here in a couple of weeks!

1 Like

I have a script I use to download posts from public Stack Overflow/Exchange to post on my Jekyll blog:

I considered using the Discourse API to post them to my forum, but I don’t have so many that copy-and-paste doesn’t work just as well. With a thousand or so posts, automating that steps is key! Good luck.

2 Likes