docker-postgres-backup-local icon indicating copy to clipboard operation
docker-postgres-backup-local copied to clipboard

Compress directory backups as a single file

Open midestefanis opened this issue 4 years ago • 1 comments

I leave an example of a small DB:

image

The last backup is with the new configuration and, as can be seen, it increases the size by 166%.

image

Then if I compress that directory. The size happens to be similar to the previous ones (which is cheaper for me to store in the cloud, especially when we talk about GBs of storage and multiple DBs).

tar -zcf ****-20200904-173736-dump.tar.gz ***-20200904-173736-dump
2.4M    ***-20200904-041500.sql.gz
6.4M    ***-20200904-173736-dump
2.6M    ***-20200904-173736-dump.tar.gz

Besides being cheaper in my opinion, it is also easier to manipulate a compressed file than a folder, don't you consider the same?

It is only a suggestion and an exchange of opinion. I can solve it by compressing that directory myself, but I was interested in sharing my point of view with you since this project is looking very good. Let me know if you think the same as me!

Originally posted by @midestefanis in #28 (comment)

midestefanis avatar Sep 07 '20 19:09 midestefanis

Isn't using POSTGRES_EXTRA_OPTS: -Ft -Z6 already fixes this issue?

prodrigestivill avatar Feb 26 '22 19:02 prodrigestivill