From: Tom Lane Date: Sun, 8 Apr 2018 20:35:42 +0000 (-0400) Subject: Doc: clarify explanation of pg_dump usage. X-Git-Tag: REL_10_4~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ecd5fba9b4562a71c92eddff52b20a1b4b3af32;p=postgresql Doc: clarify explanation of pg_dump usage. This section confusingly used both "infile" and "outfile" to refer to the same file, i.e. the textual output of pg_dump. Use "dumpfile" for both cases, per suggestion from Jonathan Katz. Discussion: https://postgr.es/m/152311295239.31235.6487236091906987117@wrigleys.postgresql.org --- diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml index 95aeb35507..327d87302b 100644 --- a/doc/src/sgml/backup.sgml +++ b/doc/src/sgml/backup.sgml @@ -35,7 +35,7 @@ for this purpose. The basic usage of this command is: -pg_dump dbname > outfile +pg_dump dbname > dumpfile As you see, pg_dump writes its result to the standard output. We will see below how this can be useful. @@ -109,9 +109,9 @@ pg_dump dbname > psql program. The general command form to restore a dump is -psql dbname < infile +psql dbname < dumpfile - where infile is the + where dumpfile is the file output by the pg_dump command. The database dbname will not be created by this command, so you must create it yourself from template0 @@ -141,7 +141,7 @@ psql dbname < psql exit with an exit status of 3 if an SQL error occurs: -psql --set ON_ERROR_STOP=on dbname < infile +psql --set ON_ERROR_STOP=on dbname < dumpfile Either way, you will only have a partially restored database. Alternatively, you can specify that the whole dump should be @@ -201,11 +201,11 @@ pg_dump -h host1 dbname | psql -h h cluster, and also preserves cluster-wide data such as role and tablespace definitions. The basic usage of this command is: -pg_dumpall > outfile +pg_dumpall > dumpfile The resulting dump can be restored with psql: -psql -f infile postgres +psql -f dumpfile postgres (Actually, you can specify any existing database name to start from, but if you are loading into an empty cluster then postgres