Why are backups so large?

pg_dump supports compression:

-Z, --compress=0-9

You just need to balance between time spent VS file-size.

Maybe patch this file and add a small compression level (2~3) and measure the impact on your workload.

In my starting database (10 posts, 50 users) I see the following:

-rw-r--r-- 1 postgres postgres 2,2M Jul 24 16:04 back_Z_2 -rw-r--r-- 1 postgres postgres 11M Jul 24 16:04 back_no_compression

`
Compression (Z=2)
real 0m0.557s
user 0m0.072s
sys 0m0.032s

No Compression
real 0m0.837s
user 0m0.280s
sys 0m0.036s
`

But you need to use some real data to really commit to this. Using Meta would be a good example.

1 Like