When you are specifying compression on pg_dump, is the compression happening on the server side so that the transfer is quicker or is the pg_dump doing the compression?
Thank you
When you are specifying compression on pg_dump, is the compression happening on the server side so that the transfer is quicker or is the pg_dump doing the compression?
Thank you
The compression with -Fc
(custom format) dumps is done client-side. Per the documentation:
This format is also compressed by default
There is no protocol compression done between client and server.
PostgreSQL protocol compression would be very nice to have, but hasn't yet been implemented.
You can run pg_dump
server-side and stream its compressed dump over something like ssh to the client if you wish, though.
Following command may reduce the backup size.
$pg_dump -i -U dbuser -F c -v --schema=testschema -f outputpath/outputfile.tar "mydb"
then, compress the output file using gunzip tool
$gzip outputpath/outputfile.tar