How to export content


(Barbara) #1

Hello all.

Thank you for a wonderful piece of software.

I need to export all content from my Discourse instance. I do not care about users, groups and other metadata, I care about content.

I have searched through this forum and I have found that scripts exist for importing data into Discourse, but I am not at all sure about exporting facilities. Are they available?

Alternatively, is there a way to easily reconstitute the content from a downloaded backup?

TIA,
Barbara


(Jeff Atwood) #2

Yes, see Admin, Backup where you can export and download all your Discourse data right from your web browser.


(Barbara) #5

Thanks Jeff, maybe I am being thick, but how do I view the contents of the exported files outside of Discourse? That was my original question.


(Jeff Atwood) #6

I see, the exported data is a compressed set of Postgres database tables so you would need to load them into Postgres.


(Barbara) #7

Great, I suspected that much but needed confirmation. Many thanks again!


(Jiaqi Li) #8

Hello Jeff, I also have the similar question here.

I went to Administration–Backup and found the download button but the files here are XXXXXXX.tar.gz.

Could you tell me how can I open the tar.gz file?

Thank you!


(Jeff Atwood) #12

Sure just download an extractor or decompression tool that understands this UNIX / Linux compression format, such as 7zip or WinZip or similar.

Once extracted, you have the complete Postgres database which contains all information in your Discourse. Simply load that database into Postgres and you can query out anything you like using SQL.

Alternately you can install the Data Explorer plugin and run SQL queries in your browser, against the Postgres database that makes up your Discourse.


(system) automatically bumped #13