# Export all data of all posts

**URL:** https://meta.discourse.org/t/export-all-data-of-all-posts/152823
**Category:** Support
**Created:** [May 26, 2020, 8:19pm UTC](https://meta.discourse.org/t/export-all-data-of-all-posts/152823 "2020-05-26T20:19:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jenni\_alencar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jenni_alencar/32/169068_2.png) [@jenni\_alencar](https://meta.discourse.org/u/jenni_alencar)
#### Post date: [May 26, 2020, 8:19pm UTC](https://meta.discourse.org/t/export-all-data-of-all-posts/152823/1 "2020-05-26T20:19:07Z")

</div>

Is it possible to export the data of all posts?

---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://meta.discourse.org/u/EricGT)
#### Post date: [May 26, 2020, 9:16pm UTC](https://meta.discourse.org/t/export-all-data-of-all-posts/152823/2 "2020-05-26T21:16:53Z")

</div>

I don’t know all of the ways but the most practical way would be if you have Discourse admin rights then

In the upper right click Hamburger menu.  
Click Admin.  
Scroll down until you see Backups.  
Click on Backups which will take you a new page listing the backups available.  
Click download and follow the instructions which uses an e-mail to verify you are really who you claim to be.  
IIRC this results in a \*.tar.gz file  
From the \*.tar.gz file the \*.sql file can be extracted and used to populate a new empty database in a PostgreSQL database.

Note that `posts` is a table and has two columns that hold data about a post, `raw` which is the text as entered and `cooked` which is closer to the HTML you see but I don’t exactly how to cook the raw as I am not a chef. 😀

HTH

---

<div class="post-metadata">

### Author: ![gergnd](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@gergnd](https://meta.discourse.org/u/gergnd)
#### Post date: [November 6, 2020, 3:12pm UTC](https://meta.discourse.org/t/export-all-data-of-all-posts/152823/7 "2020-11-06T15:12:47Z")

</div>

@Falco Is there a way to get a human readable file with all the post’s content?

I’m trying to avoid going post by post and copy/pasting to google docs 🙂

---

<div class="post-metadata">

### Author: ![jhuynh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jhuynh/32/216697_2.png) [@jhuynh](https://meta.discourse.org/u/jhuynh)
#### Post date: [September 20, 2021, 7:55pm UTC](https://meta.discourse.org/t/export-all-data-of-all-posts/152823/8 "2021-09-20T19:55:54Z")

</div>

I tried this but when I try to run the .sql file in on my PostgreSQL database, I get a syntax error:

```plaintext
ERROR: syntax error at or near "1"
LINE 5066: 1 33a64b9c942fe3f0b264467590ac83a2207b557db26e86ec8d3ebcf605...
           ^
SQL state: 42601
Character: 126056

```

Any advice?
