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


Persistent formatting errors in app.yml with tabs and spaces
(Jeff Atwood) #2

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


(Barbara) #3

Thanks!

However I can only see the Download button, not the Export one. What am I missing?


(Jeff Atwood) #4

I was not using the words in the literal sense of “there is a button with this word on the page” but more as general concepts. Backup and restore is what you want.


(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) #9

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


(Jiaqi Li) #10

:grinning: Great thanks!


(Jiaqi Li) #11

Hello Jeff, one more question here.

I downloaded 7Zip to open the tar.gz file but the data are all about page contents, which is not what I want.

Actually I want to download the tiles of my website’s home page. Here I use Discourse Meta’s home page for example, I want to have “Stting up Let’s Encrypt cert with discourse_docker”, “Arxiv one box plugin”, “How to easily report other html pages?”, “Link’s href cut off after 500 characters”, “Can we Filter people in/user by group name” etc. What should I do?

Thank you!


(Jeff Atwood) #12

Correct, you have downloaded 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.