|
35 | 35 | <xref linkend="app-pgdump"> for this purpose. The basic usage of this
|
36 | 36 | command is:
|
37 | 37 | <synopsis>
|
38 |
| -pg_dump <replaceable class="parameter">dbname</replaceable> > <replaceable class="parameter">outfile</replaceable> |
| 38 | +pg_dump <replaceable class="parameter">dbname</replaceable> > <replaceable class="parameter">dumpfile</replaceable> |
39 | 39 | </synopsis>
|
40 | 40 | As you see, <application>pg_dump</> writes its result to the
|
41 | 41 | standard output. We will see below how this can be useful.
|
@@ -110,9 +110,9 @@ pg_dump <replaceable class="parameter">dbname</replaceable> > <replaceable cl
|
110 | 110 | be read in by the <application>psql</application> program. The
|
111 | 111 | general command form to restore a dump is
|
112 | 112 | <synopsis>
|
113 |
| -psql <replaceable class="parameter">dbname</replaceable> < <replaceable class="parameter">infile</replaceable> |
| 113 | +psql <replaceable class="parameter">dbname</replaceable> < <replaceable class="parameter">dumpfile</replaceable> |
114 | 114 | </synopsis>
|
115 |
| - where <replaceable class="parameter">infile</replaceable> is the |
| 115 | + where <replaceable class="parameter">dumpfile</replaceable> is the |
116 | 116 | file output by the <application>pg_dump</> command. The database <replaceable
|
117 | 117 | class="parameter">dbname</replaceable> will not be created by this
|
118 | 118 | command, so you must create it yourself from <literal>template0</>
|
@@ -140,7 +140,7 @@ psql <replaceable class="parameter">dbname</replaceable> < <replaceable class
|
140 | 140 | behavior and have <application>psql</application> exit with an
|
141 | 141 | exit status of 3 if an SQL error occurs:
|
142 | 142 | <programlisting>
|
143 |
| -psql --set ON_ERROR_STOP=on dbname < infile |
| 143 | +psql --set ON_ERROR_STOP=on dbname < dumpfile |
144 | 144 | </programlisting>
|
145 | 145 | Either way, you will only have a partially restored database.
|
146 | 146 | Alternatively, you can specify that the whole dump should be
|
@@ -200,11 +200,11 @@ pg_dump -h <replaceable>host1</> <replaceable>dbname</> | psql -h <replaceable>h
|
200 | 200 | cluster, and also preserves cluster-wide data such as role and
|
201 | 201 | tablespace definitions. The basic usage of this command is:
|
202 | 202 | <synopsis>
|
203 |
| -pg_dumpall > <replaceable>outfile</> |
| 203 | +pg_dumpall > <replaceable>dumpfile</> |
204 | 204 | </synopsis>
|
205 | 205 | The resulting dump can be restored with <application>psql</>:
|
206 | 206 | <synopsis>
|
207 |
| -psql -f <replaceable class="parameter">infile</replaceable> postgres |
| 207 | +psql -f <replaceable class="parameter">dumpfile</replaceable> postgres |
208 | 208 | </synopsis>
|
209 | 209 | (Actually, you can specify any existing database name to start from,
|
210 | 210 | but if you are loading into an empty cluster then <literal>postgres</>
|
|
0 commit comments