PostgreSQL has the ability to produce binary database dumps via the pg_dump
command, which produce smaller files than the SQL format and are faster to restore. See the full list of pg_dump
flags.
To take advantage of this, you can set the extra flags for pg_dump
on the database connection(s) in app/config/database.php
.
'connections' => [
'pgsql' => [
'driver' => 'pgsql'
...,
'dump' => [
...,
'add_extra_option' => '--format=c',
]
],
Additionally, you can change the file extension of the database dump file to signify that it is not a text SQL file.
'backup' => [
...,
'database_dump_file_extension' => 'backup',
],