postgresql-backup-s3 icon indicating copy to clipboard operation
postgresql-backup-s3 copied to clipboard

Use pg_dump custom format

Open natali-maximenko opened this issue 4 years ago • 2 comments

Hi there,

store dump in gz is nice idea, but PG can do this by -Fc option

pg_dump $POSTGRES_HOST_OPTS $POSTGRES_DATABASE -Fc > $SRC_FILE.gz

Custom format work faster then redirecting to gzip. I think it is important when dump isn't small.

Thank you for making this image, is very cool!

natali-maximenko avatar May 22 '20 12:05 natali-maximenko

It would be helpful to include the custom format, as for the database size of 50GB it takes around 15 mins to backup the database in plain format. Please update and release, and thanks a lot for the increments to the base image!

yousufctec avatar Jun 01 '21 05:06 yousufctec

FYI you don't need the .gz in > $SRC_FILE.gz as SRC_FILE already has the .gz extension at the end. The -Fc option is a good addition though, good idea!

voinik avatar Jan 20 '22 10:01 voinik