Is it possible to import a Discourse backup as a category inside an alredy existing discourse isntance?

AI-generated summary

In a support thread titled Is it possible to import a Discourse backup as a category inside an already existing Discourse instance?, shulard asks if they can import content from a Discourse for Teams backup into a specific category of their existing self-hosted Discourse instance. They explain their situation: transitioning from a partner’s soon-to-close company to working directly with the final client, and wanting to preserve team discussions without starting fresh. While they’ve backed up the Teams data (PostgreSQL format), they want to avoid restoring it into a blank instance and instead integrate it into their current forum. RGJ responds with a practical workaround: restore the backup into a temporary self-hosted Discourse instance, consolidate desired content into a single category, use the command-line category export/import tool to generate an export file, then import that into the target forum as a new category — finally deleting the temporary forum. shulard confirms this approach will work for them and thanks RGJ.

Hello here !

First, thank you for this awesome tool, it change my remote working routine a lot :wink:. Now I want Discourse everywhere !

Currently I work as a freelance with a partner on a bug project. We use discourse for teams as a central discussion point. Unfortunatly my partner company will die soon, I just contacted the final customer to work with him directly.

On my side, I already have a discourse instance with some content in it (specific categories and posts, important notes…). I know that it’s possible to backup the teams content (and already do it) but it’ll be a postgresql backup.

For sure, I can import this backup inside a blank discourse install but is it possible to import all the Discourse for teams content inside a specific category of my current discourse instance ?
This current discourse instance is a self hosted one so I can install custom tools if required. I searched and didn’t found anyone who already encountered that issue here.

Maybe I’ll need to export/import the content in another format than the SQL one…

Thanks
Stéphane

You can use the functionality for category export and import. Since it’s a command line tool you will be unable to use it from your Discourse for Teams instance. But this will work:

  • Create and download a backup from your Discourse for Teams instance
  • Restore it into a self-hosted temporary forum
  • Move all categories you want to keep into a single category
  • Create a category export file using the command line
  • Import it as a category into the destination forum
  • Delete the temporary forum

Hello @RGJ !

Thank you for your answer, it’ll be the correct approach for me :+1:.