# How big is your Discourse backup?

**URL:** <https://meta.discourse.org/t/how-big-is-your-discourse-backup/41351>\
**Category:** Support\
**Created:** [21 مارس 2016، 6:53ص UTC](https://meta.discourse.org/t/how-big-is-your-discourse-backup/41351 "2016-03-21T06:53:05Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)\
**Post date:** [25 أبريل 2016، 8:07م UTC](https://meta.discourse.org/t/how-big-is-your-discourse-backup/41351/16 "2016-04-25T20:07:18Z")

</div>

On one instance my backups are 9.6GB+, another 7.8GB+ **compressed** , my `email_logs` table is not an issue at less than 60MB and less than 15MB each **uncompressed** - both running Discourse well over 1 year.

I haven’t seen any issues with `email_logs` table growing unexpectedly so far.

* * *

What are the results of the following queries for your instance?

Get the count of items and date range of email log table contents:

```sql
SELECT count(*), MAX(created_at), MIN(created_at) FROM email_logs;

```

Get size of top 20 relations:

```SQL
SELECT nspname || '.' || relname AS "relation",
    pg_size_pretty(pg_relation_size(C.oid)) AS "size"
  FROM pg_class C
  LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
  WHERE nspname NOT IN ('pg_catalog', 'information_schema')
  ORDER BY pg_relation_size(C.oid) DESC
  LIMIT 20;

```

Get count of rows by email\_type:

```SQL
SELECT count(email_type) as count,email_type FROM email_logs GROUP BY email_type;

```

---

_[View the full topic](https://meta.discourse.org/t/how-big-is-your-discourse-backup/41351)._
