In psql
, I just ran the command pg_dump
to a custom-format archive:
Kurts-MacBook-Pro-2:~ kurtpeek$ psql --host localhost.aptible.in --port 64186 --username aptible --dbname db
Password for user aptible:
psql (10.4, server 10.3 (Debian 10.3-1.pgdg80+1))
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
db=# pg_dump --format=custom
db-#
As I understand it, this should back up the database (of which the name is obtained from the environment variable PGDATABASE
, and is presumably db
here) to a file. Is is unclear, to me, however, where this file is located?
From the documentation (https://www.postgresql.org/docs/10/static/app-pgdump.html) for the --file
option,
-f file
--file=file
Send output to the specified file. This parameter can be omitted for file based output formats, in which case the standard output is used. It must be given for the directory output format however, where it specifies the target directory instead of a file. In this case the directory is created by
pg_dump
and must not exist before.
I suppose that the custom
format is a file-based format, so I would expect the 'standard output' to be used. But what is the 'standard output' in this case? (I checked my home directory but nothing had been created in it recently).