Hello experts I am using postgres 9.5 . When I take a backup from pgadmin it has 950 MB size but when i take the same db backup from pgdump.exe command the backup size is with 7.5 GB. I am confused which backup file will be secured for me that I can use to restore? the restoring process is also slow in postgresql. Please help me.
When you backup something in pgadmin it just calls pg_dump
with appropriate options, so both your backups are made by the same pg_dump
utility.
I guess you're comparing dumps in two different formats.
Default format for pg_dump
is plain
, which is basically an enormous uncompressed SQL file.
As for pgadmin, it uses custom
format by default, which is a highly compressed binary file.
Also note that pgadmin always displays the actual pg_dump
command used to create your dump in the log window, along with its full output.
You should be able to call this command in your command prompt to generate an identical backup file.
You can read more about different output formats and other pg_dump
options in PostgreSQL docs.