|
1 | | -<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.86 2010/02/24 16:27:40 momjian Exp $ --> |
| 1 | +<!-- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_restore.sgml,v 1.87 2010/05/15 18:11:07 tgl Exp $ --> |
2 | 2 |
|
3 | 3 | <refentry id="APP-PGRESTORE"> |
4 | 4 | <refmeta> |
|
47 | 47 |
|
48 | 48 | <para> |
49 | 49 | <application>pg_restore</application> can operate in two modes. |
50 | | - If a database name is specified, the archive is restored directly into |
| 50 | + If a database name is specified, <application>pg_restore</application> |
| 51 | + connects to that database and restores archive contents directly into |
51 | 52 | the database. Otherwise, a script containing the SQL |
52 | 53 | commands necessary to rebuild the database is created and written |
53 | | - to a file or standard output.The script output is equivalent to |
| 54 | + to a file or standard output.This script output is equivalent to |
54 | 55 | the plain text output format of <application>pg_dump</application>. |
55 | 56 | Some of the options controlling the output are therefore analogous to |
56 | 57 | <application>pg_dump</application> options. |
|
170 | 171 | <term><literal>tar</></term> |
171 | 172 | <listitem> |
172 | 173 | <para> |
173 | | - The archive is a <command>tar</command> archive. Using this |
174 | | - archive format allows reordering and/or exclusion of schema |
175 | | - elements at the time the database is restored. It is also |
176 | | - possible to limit which data is reloaded at restore time. |
| 174 | + The archive is a <command>tar</command> archive. |
177 | 175 | </para> |
178 | 176 | </listitem> |
179 | 177 | </varlistentry> |
|
184 | 182 | <listitem> |
185 | 183 | <para> |
186 | 184 | The archive is in the custom format of |
187 | | - <application>pg_dump</application>. This is the most |
188 | | - flexible format in that it allows reordering of data load |
189 | | - as well as schema elements. This format is also compressed |
190 | | - by default. |
| 185 | + <application>pg_dump</application>. |
191 | 186 | </para> |
192 | 187 | </listitem> |
193 | 188 | </varlistentry> |
|
262 | 257 | <listitem> |
263 | 258 | <para> |
264 | 259 | List the contents of the archive. The output of this operation |
265 | | - can be used with the <option>-L</option> option to restrict |
266 | | - and reorder the items that are restored. |
| 260 | + can be used as input to the <option>-L</option> option. Note that |
| 261 | + if filtering switches such as <option>-n</> or <option>-t</> are |
| 262 | + used with <option>-l</>, they will restrict the items listed. |
267 | 263 | </para> |
268 | 264 | </listitem> |
269 | 265 | </varlistentry> |
|
273 | 269 | <term><option>--use-list=<replaceable class="parameter">list-file</replaceable></option></term> |
274 | 270 | <listitem> |
275 | 271 | <para> |
276 | | - Restore elements in <replaceable class="PARAMETER"> |
277 | | - list-file</replaceable> only, and in the |
278 | | - order they appear in the file. Lines can be moved and can also |
279 | | - be commented out by placing a <literal>;</literal> at the |
280 | | - start of the line. (See below for examples.) |
| 272 | + Restore only those archive elements that are listed in <replaceable |
| 273 | + class="PARAMETER">list-file</replaceable>, and restore them in the |
| 274 | + order they appear in the file. Note that |
| 275 | + if filtering switches such as <option>-n</> or <option>-t</> are |
| 276 | + used with <option>-L</>, they will further restrict the items restored. |
| 277 | + </para> |
| 278 | + <para> |
| 279 | + <replaceable class="PARAMETER">list-file</> is normally created by |
| 280 | + editing the output of a previous <option>-l</> operation. |
| 281 | + Lines can be moved or removed, and can also |
| 282 | + be commented out by placing a semicolon (<literal>;</literal>) at the |
| 283 | + start of the line. See below for examples. |
281 | 284 | </para> |
282 | 285 | </listitem> |
283 | 286 | </varlistentry> |
|