When executing a pg_dump which should I use and why?
pg_dump -U <user> <database> | gzip -c > backup.gz
pg_dump -F c -f backup.tar.gz -U <user> <database>
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
According to the
pg_dump documentation the custom format is:
the most flexible output format in that it allows manual selection and reordering of archived items during restore. This format is also compressed by default
You can also select the compression level with the
For simplicity I would definitely go for
pg_dump -F c over piping to gzip.