Is it possible to merge two Discourse instances into one?


(jon r) #1

Continuing the discussion from Discoursive principles for Discourse 2.0, extracted from there and reformulated:

Is it possible to merge two Discourse instances into one?

A workflow could be like this:

  1. Export site via admin
  2. Import tarball via admin
  • check sitename
    • via subfolder of tarball?
    • move assets to target site, do automatic intelligent merge or offer resolving strategies
  • transpose/migrate database
    • resolve duplicate entries, automerge or conflict handling
    • allow manual merge
  • content types I am able to identify
    • users
    • posts
    • categories
    • polls

Is there a way to quote something that was said on a different Discourse instance?
(Jeff Atwood) #2

Interesting concept, surprisingly this is the first time anyone has asked for it.

Merging two different sets of users and topics might get weird with overlaps. But at least we know the fields are identical since it is a Discourse → Discourse merge.


(jon r) #3

I’ve updated the description. How can I turn this into a wiki post?


(Jeff Atwood) #4

Editing is fine, I don’t think this needs to be a wiki post. It is a rare request.


(jon r) #5

I see. There is a point in doint community management by providing clear constraints for possible action.


(Martin Walsh) #6

@almereyda So in this same rare situation myself, want to merge a spin off community instance back into the large community instance. You get any further with this?

Thanks


(jon r) #7

No, unfortunately not. Maybe one day someone takes the workflow from above and implements it. I’m currently not focussed on hacking Discourse, but may be some time in the future again.


(Nicoles) #8

I’m working on the same thing, and I’m curious if it makes more sense to build it out of the restore feature or off the import scripts. Seems doable from either case, just wondering if anyone had ideas.


(Kane York) #9

I think you’d do best to build it as an import script.


(Jeff Atwood) #12

There has been interest in splitting a Discourse into two sites, and we have some tooling to support this now. But merging is another matter entirely, and far more difficult because of potential conflicts.


(Kane York) #13

I’m going to say again that using an import script is a fairly obvious idea :slight_smile: Load a backup using psql to the import db and work from there.


(Peter Bäckgren) #14

Just chipping in… in the same situation, making an older Discourse part of a newer one in it’s own closed category to retain posts (and users) would be nice. Since I handle the sso login part for both I don’t have to worry about any possible overlap.

I understand this is a rare request but as Discourse gets older retaining content becomes more and more important as old dying forums are phased out. I’ personally looking at a 2 year old 800 topics/8000 posts thingie.

A complete text export (which has been seen as a nice feature elsewhere but doesn’t exist (?) ) would come in handy.

Theoretically I might be interested in doing something about it. No clue about Postgres so I would probably try to move the entire database to MS Sql Server (for which I have tools) or mySql (at worst). This seems to be moderately hard without Postgres experience. Then creating something that crawls through the entire database and dumps topics by user or whatever cannot be too hard. With some documentation (don’t know what is public) and/or helps from the devs creating a tool that would do this should be plausible.

Chances for such a project would go up if there is interest/need from others :smiley: .


(Sam Saffron) #15

These days we have a category importer and exporter that @neil built, you would use that to merge instances


Merging two Discourse forums
(Erlend Sogge Heggen) #18

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.