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

speedup pg_dump and restore

Open gillbates opened this issue 3 years ago • 3 comments

Hi Team,

thanks for this wonderful docker. It really simplify the things. However the current pg_dump command is very slow, can we use

pg_dump -j 8 -Fd -f /tmp/newout.dir fsdcm_external

and then output with a tar.gz file?

https://stackoverflow.com/questions/2094963/postgresql-improving-pg-dump-pg-restore-performance

gillbates avatar Apr 20 '22 17:04 gillbates

Is this issue not a duplicate of #33 ?

prodrigestivill avatar Apr 21 '22 09:04 prodrigestivill

nope, i mean use 'j 8' to speed up the back and restore process? maybe we could 1, use this j 8 and -Fd as the default way, and then compress the whole directory into a tgz file fom simplicity? 2, we use our built-in script to unzip the tgz file and pg_restore ?

gillbates avatar Apr 21 '22 09:04 gillbates

If I understand correctly you can use POSTGRES_EXTRA_OPTS env variable for that, is that right?

prodrigestivill avatar Apr 21 '22 10:04 prodrigestivill