~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/html/app-pgrestore.html

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 
2
<HTML
 
3
><HEAD
 
4
><TITLE
 
5
>pg_restore</TITLE
 
6
><META
 
7
NAME="GENERATOR"
 
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
 
9
REV="MADE"
 
10
HREF="mailto:pgsql-docs@postgresql.org"><LINK
 
11
REL="HOME"
 
12
TITLE="PostgreSQL 9.1beta1 Documentation"
 
13
HREF="index.html"><LINK
 
14
REL="UP"
 
15
TITLE="PostgreSQL Client Applications"
 
16
HREF="reference-client.html"><LINK
 
17
REL="PREVIOUS"
 
18
TITLE="pg_dumpall"
 
19
HREF="app-pg-dumpall.html"><LINK
 
20
REL="NEXT"
 
21
TITLE="psql"
 
22
HREF="app-psql.html"><LINK
 
23
REL="STYLESHEET"
 
24
TYPE="text/css"
 
25
HREF="stylesheet.css"><META
 
26
HTTP-EQUIV="Content-Type"
 
27
CONTENT="text/html; charset=ISO-8859-1"><META
 
28
NAME="creation"
 
29
CONTENT="2011-04-27T21:20:33"></HEAD
 
30
><BODY
 
31
CLASS="REFENTRY"
 
32
><DIV
 
33
CLASS="NAVHEADER"
 
34
><TABLE
 
35
SUMMARY="Header navigation table"
 
36
WIDTH="100%"
 
37
BORDER="0"
 
38
CELLPADDING="0"
 
39
CELLSPACING="0"
 
40
><TR
 
41
><TH
 
42
COLSPAN="5"
 
43
ALIGN="center"
 
44
VALIGN="bottom"
 
45
><A
 
46
HREF="index.html"
 
47
>PostgreSQL 9.1beta1 Documentation</A
 
48
></TH
 
49
></TR
 
50
><TR
 
51
><TD
 
52
WIDTH="10%"
 
53
ALIGN="left"
 
54
VALIGN="top"
 
55
><A
 
56
TITLE="pg_dumpall"
 
57
HREF="app-pg-dumpall.html"
 
58
ACCESSKEY="P"
 
59
>Prev</A
 
60
></TD
 
61
><TD
 
62
WIDTH="10%"
 
63
ALIGN="left"
 
64
VALIGN="top"
 
65
><A
 
66
TITLE="pg_dumpall"
 
67
HREF="app-pg-dumpall.html"
 
68
>Fast Backward</A
 
69
></TD
 
70
><TD
 
71
WIDTH="60%"
 
72
ALIGN="center"
 
73
VALIGN="bottom"
 
74
></TD
 
75
><TD
 
76
WIDTH="10%"
 
77
ALIGN="right"
 
78
VALIGN="top"
 
79
><A
 
80
TITLE="psql"
 
81
HREF="app-psql.html"
 
82
>Fast Forward</A
 
83
></TD
 
84
><TD
 
85
WIDTH="10%"
 
86
ALIGN="right"
 
87
VALIGN="top"
 
88
><A
 
89
TITLE="psql"
 
90
HREF="app-psql.html"
 
91
ACCESSKEY="N"
 
92
>Next</A
 
93
></TD
 
94
></TR
 
95
></TABLE
 
96
><HR
 
97
ALIGN="LEFT"
 
98
WIDTH="100%"></DIV
 
99
><H1
 
100
><A
 
101
NAME="APP-PGRESTORE"
 
102
></A
 
103
>pg_restore</H1
 
104
><DIV
 
105
CLASS="REFNAMEDIV"
 
106
><A
 
107
NAME="AEN79458"
 
108
></A
 
109
><H2
 
110
>Name</H2
 
111
>pg_restore&nbsp;--&nbsp;   restore a <SPAN
 
112
CLASS="PRODUCTNAME"
 
113
>PostgreSQL</SPAN
 
114
> database from an
 
115
   archive file created by <SPAN
 
116
CLASS="APPLICATION"
 
117
>pg_dump</SPAN
 
118
>
 
119
  </DIV
 
120
><DIV
 
121
CLASS="REFSYNOPSISDIV"
 
122
><A
 
123
NAME="AEN79465"
 
124
></A
 
125
><H2
 
126
>Synopsis</H2
 
127
><P
 
128
><TT
 
129
CLASS="COMMAND"
 
130
>pg_restore</TT
 
131
> [<TT
 
132
CLASS="REPLACEABLE"
 
133
><I
 
134
>connection-option</I
 
135
></TT
 
136
>...] [<TT
 
137
CLASS="REPLACEABLE"
 
138
><I
 
139
>option</I
 
140
></TT
 
141
>...] [<TT
 
142
CLASS="REPLACEABLE"
 
143
><I
 
144
>filename</I
 
145
></TT
 
146
>]</P
 
147
></DIV
 
148
><DIV
 
149
CLASS="REFSECT1"
 
150
><A
 
151
NAME="APP-PGRESTORE-DESCRIPTION"
 
152
></A
 
153
><H2
 
154
>Description</H2
 
155
><P
 
156
>   <SPAN
 
157
CLASS="APPLICATION"
 
158
>pg_restore</SPAN
 
159
> is a utility for restoring a
 
160
   <SPAN
 
161
CLASS="PRODUCTNAME"
 
162
>PostgreSQL</SPAN
 
163
> database from an archive
 
164
   created by <A
 
165
HREF="app-pgdump.html"
 
166
>pg_dump</A
 
167
> in one of the non-plain-text
 
168
   formats.  It will issue the commands necessary to reconstruct the
 
169
   database to the state it was in at the time it was saved.  The
 
170
   archive files also allow <SPAN
 
171
CLASS="APPLICATION"
 
172
>pg_restore</SPAN
 
173
> to
 
174
   be selective about what is restored, or even to reorder the items
 
175
   prior to being restored. The archive files are designed to be
 
176
   portable across architectures.
 
177
  </P
 
178
><P
 
179
>   <SPAN
 
180
CLASS="APPLICATION"
 
181
>pg_restore</SPAN
 
182
> can operate in two modes.
 
183
   If a database name is specified, <SPAN
 
184
CLASS="APPLICATION"
 
185
>pg_restore</SPAN
 
186
>
 
187
   connects to that database and restores archive contents directly into
 
188
   the database.  Otherwise, a script containing the SQL
 
189
   commands necessary to rebuild the database is created and written
 
190
   to a file or standard output.  This script output is equivalent to
 
191
   the plain text output format of <SPAN
 
192
CLASS="APPLICATION"
 
193
>pg_dump</SPAN
 
194
>.
 
195
   Some of the options controlling the output are therefore analogous to
 
196
   <SPAN
 
197
CLASS="APPLICATION"
 
198
>pg_dump</SPAN
 
199
> options.
 
200
  </P
 
201
><P
 
202
>   Obviously, <SPAN
 
203
CLASS="APPLICATION"
 
204
>pg_restore</SPAN
 
205
> cannot restore information
 
206
   that is not present in the archive file.  For instance, if the
 
207
   archive was made using the <SPAN
 
208
CLASS="QUOTE"
 
209
>"dump data as
 
210
   <TT
 
211
CLASS="COMMAND"
 
212
>INSERT</TT
 
213
> commands"</SPAN
 
214
> option,
 
215
   <SPAN
 
216
CLASS="APPLICATION"
 
217
>pg_restore</SPAN
 
218
> will not be able to load the data
 
219
   using <TT
 
220
CLASS="COMMAND"
 
221
>COPY</TT
 
222
> statements.
 
223
  </P
 
224
></DIV
 
225
><DIV
 
226
CLASS="REFSECT1"
 
227
><A
 
228
NAME="APP-PGRESTORE-OPTIONS"
 
229
></A
 
230
><H2
 
231
>Options</H2
 
232
><P
 
233
>    <SPAN
 
234
CLASS="APPLICATION"
 
235
>pg_restore</SPAN
 
236
> accepts the following command
 
237
    line arguments.
 
238
 
 
239
    <P
 
240
></P
 
241
></P><DIV
 
242
CLASS="VARIABLELIST"
 
243
><DL
 
244
><DT
 
245
><TT
 
246
CLASS="REPLACEABLE"
 
247
><I
 
248
>filename</I
 
249
></TT
 
250
></DT
 
251
><DD
 
252
><P
 
253
>       Specifies the location of the archive file (or directory, for a
 
254
       directory-format archive) to be restored.
 
255
       If not specified, the standard input is used.
 
256
       </P
 
257
></DD
 
258
><DT
 
259
><TT
 
260
CLASS="OPTION"
 
261
>-a</TT
 
262
><BR><TT
 
263
CLASS="OPTION"
 
264
>--data-only</TT
 
265
></DT
 
266
><DD
 
267
><P
 
268
>        Restore only the data, not the schema (data definitions).
 
269
       </P
 
270
></DD
 
271
><DT
 
272
><TT
 
273
CLASS="OPTION"
 
274
>-c</TT
 
275
><BR><TT
 
276
CLASS="OPTION"
 
277
>--clean</TT
 
278
></DT
 
279
><DD
 
280
><P
 
281
>        Clean (drop) database objects before recreating them.
 
282
       </P
 
283
></DD
 
284
><DT
 
285
><TT
 
286
CLASS="OPTION"
 
287
>-C</TT
 
288
><BR><TT
 
289
CLASS="OPTION"
 
290
>--create</TT
 
291
></DT
 
292
><DD
 
293
><P
 
294
>        Create the database before restoring into it.  (When this
 
295
        option is used, the database named with <TT
 
296
CLASS="OPTION"
 
297
>-d</TT
 
298
> is
 
299
        used only to issue the initial <TT
 
300
CLASS="COMMAND"
 
301
>CREATE DATABASE</TT
 
302
>
 
303
        command.  All data is restored into the database name that
 
304
        appears in the archive.)
 
305
       </P
 
306
></DD
 
307
><DT
 
308
><TT
 
309
CLASS="OPTION"
 
310
>-d <TT
 
311
CLASS="REPLACEABLE"
 
312
><I
 
313
>dbname</I
 
314
></TT
 
315
></TT
 
316
><BR><TT
 
317
CLASS="OPTION"
 
318
>--dbname=<TT
 
319
CLASS="REPLACEABLE"
 
320
><I
 
321
>dbname</I
 
322
></TT
 
323
></TT
 
324
></DT
 
325
><DD
 
326
><P
 
327
>        Connect to database <TT
 
328
CLASS="REPLACEABLE"
 
329
><I
 
330
>dbname</I
 
331
></TT
 
332
> and restore directly
 
333
        into the database.
 
334
       </P
 
335
></DD
 
336
><DT
 
337
><TT
 
338
CLASS="OPTION"
 
339
>-e</TT
 
340
><BR><TT
 
341
CLASS="OPTION"
 
342
>--exit-on-error</TT
 
343
></DT
 
344
><DD
 
345
><P
 
346
>        Exit if an error is encountered while sending SQL commands to
 
347
        the database. The default is to continue and to display a count of
 
348
        errors at the end of the restoration.
 
349
       </P
 
350
></DD
 
351
><DT
 
352
><TT
 
353
CLASS="OPTION"
 
354
>-f <TT
 
355
CLASS="REPLACEABLE"
 
356
><I
 
357
>filename</I
 
358
></TT
 
359
></TT
 
360
><BR><TT
 
361
CLASS="OPTION"
 
362
>--file=<TT
 
363
CLASS="REPLACEABLE"
 
364
><I
 
365
>filename</I
 
366
></TT
 
367
></TT
 
368
></DT
 
369
><DD
 
370
><P
 
371
>        Specify output file for generated script, or for the listing
 
372
        when used with <TT
 
373
CLASS="OPTION"
 
374
>-l</TT
 
375
>. Default is the standard
 
376
        output.
 
377
       </P
 
378
></DD
 
379
><DT
 
380
><TT
 
381
CLASS="OPTION"
 
382
>-F <TT
 
383
CLASS="REPLACEABLE"
 
384
><I
 
385
>format</I
 
386
></TT
 
387
></TT
 
388
><BR><TT
 
389
CLASS="OPTION"
 
390
>--format=<TT
 
391
CLASS="REPLACEABLE"
 
392
><I
 
393
>format</I
 
394
></TT
 
395
></TT
 
396
></DT
 
397
><DD
 
398
><P
 
399
>        Specify format of the archive.  It is not necessary to specify
 
400
        the format, since <SPAN
 
401
CLASS="APPLICATION"
 
402
>pg_restore</SPAN
 
403
> will
 
404
        determine the format automatically. If specified, it can be
 
405
        one of the following:
 
406
 
 
407
       <P
 
408
></P
 
409
></P><DIV
 
410
CLASS="VARIABLELIST"
 
411
><DL
 
412
><DT
 
413
><TT
 
414
CLASS="LITERAL"
 
415
>d</TT
 
416
><BR><TT
 
417
CLASS="LITERAL"
 
418
>directory</TT
 
419
></DT
 
420
><DD
 
421
><P
 
422
>           The archive is a <TT
 
423
CLASS="COMMAND"
 
424
>directory</TT
 
425
> archive.
 
426
          </P
 
427
></DD
 
428
><DT
 
429
><TT
 
430
CLASS="LITERAL"
 
431
>t</TT
 
432
><BR><TT
 
433
CLASS="LITERAL"
 
434
>tar</TT
 
435
></DT
 
436
><DD
 
437
><P
 
438
>           The archive is a <TT
 
439
CLASS="COMMAND"
 
440
>tar</TT
 
441
> archive.
 
442
          </P
 
443
></DD
 
444
><DT
 
445
><TT
 
446
CLASS="LITERAL"
 
447
>c</TT
 
448
><BR><TT
 
449
CLASS="LITERAL"
 
450
>custom</TT
 
451
></DT
 
452
><DD
 
453
><P
 
454
>           The archive is in the custom format of
 
455
           <SPAN
 
456
CLASS="APPLICATION"
 
457
>pg_dump</SPAN
 
458
>.
 
459
          </P
 
460
></DD
 
461
></DL
 
462
></DIV
 
463
><P>
 
464
       </P
 
465
></DD
 
466
><DT
 
467
><TT
 
468
CLASS="OPTION"
 
469
>-i</TT
 
470
><BR><TT
 
471
CLASS="OPTION"
 
472
>--ignore-version</TT
 
473
></DT
 
474
><DD
 
475
><P
 
476
>        A deprecated option that is now ignored.
 
477
       </P
 
478
></DD
 
479
><DT
 
480
><TT
 
481
CLASS="OPTION"
 
482
>-I <TT
 
483
CLASS="REPLACEABLE"
 
484
><I
 
485
>index</I
 
486
></TT
 
487
></TT
 
488
><BR><TT
 
489
CLASS="OPTION"
 
490
>--index=<TT
 
491
CLASS="REPLACEABLE"
 
492
><I
 
493
>index</I
 
494
></TT
 
495
></TT
 
496
></DT
 
497
><DD
 
498
><P
 
499
>        Restore definition of named index only.
 
500
       </P
 
501
></DD
 
502
><DT
 
503
><TT
 
504
CLASS="OPTION"
 
505
>-j <TT
 
506
CLASS="REPLACEABLE"
 
507
><I
 
508
>number-of-jobs</I
 
509
></TT
 
510
></TT
 
511
><BR><TT
 
512
CLASS="OPTION"
 
513
>--jobs=<TT
 
514
CLASS="REPLACEABLE"
 
515
><I
 
516
>number-of-jobs</I
 
517
></TT
 
518
></TT
 
519
></DT
 
520
><DD
 
521
><P
 
522
>        Run the most time-consuming parts
 
523
        of <SPAN
 
524
CLASS="APPLICATION"
 
525
>pg_restore</SPAN
 
526
> &mdash; those which load data,
 
527
        create indexes, or create constraints &mdash; using multiple
 
528
        concurrent jobs.  This option can dramatically reduce the time
 
529
        to restore a large database to a server running on a
 
530
        multiprocessor machine.
 
531
       </P
 
532
><P
 
533
>        Each job is one process or one thread, depending on the
 
534
        operating system, and uses a separate connection to the
 
535
        server.
 
536
       </P
 
537
><P
 
538
>        The optimal value for this option depends on the hardware
 
539
        setup of the server, of the client, and of the network.
 
540
        Factors include the number of CPU cores and the disk setup.  A
 
541
        good place to start is the number of CPU cores on the server,
 
542
        but values larger than that can also lead to faster restore
 
543
        times in many cases.  Of course, values that are too high will
 
544
        lead to decreased performance because of thrashing.
 
545
       </P
 
546
><P
 
547
>        Only the custom archive format is supported with this option.
 
548
        The input file must be a regular file (not, for example, a
 
549
        pipe).  This option is ignored when emitting a script rather
 
550
        than connecting directly to a database server.  Also, multiple
 
551
        jobs cannot be used together with the
 
552
        option <TT
 
553
CLASS="OPTION"
 
554
>--single-transaction</TT
 
555
>.
 
556
       </P
 
557
></DD
 
558
><DT
 
559
><TT
 
560
CLASS="OPTION"
 
561
>-l</TT
 
562
><BR><TT
 
563
CLASS="OPTION"
 
564
>--list</TT
 
565
></DT
 
566
><DD
 
567
><P
 
568
>        List the contents of the archive. The output of this operation
 
569
        can be used as input to the <TT
 
570
CLASS="OPTION"
 
571
>-L</TT
 
572
> option.  Note that
 
573
        if filtering switches such as <TT
 
574
CLASS="OPTION"
 
575
>-n</TT
 
576
> or <TT
 
577
CLASS="OPTION"
 
578
>-t</TT
 
579
> are
 
580
        used with <TT
 
581
CLASS="OPTION"
 
582
>-l</TT
 
583
>, they will restrict the items listed.
 
584
       </P
 
585
></DD
 
586
><DT
 
587
><TT
 
588
CLASS="OPTION"
 
589
>-L <TT
 
590
CLASS="REPLACEABLE"
 
591
><I
 
592
>list-file</I
 
593
></TT
 
594
></TT
 
595
><BR><TT
 
596
CLASS="OPTION"
 
597
>--use-list=<TT
 
598
CLASS="REPLACEABLE"
 
599
><I
 
600
>list-file</I
 
601
></TT
 
602
></TT
 
603
></DT
 
604
><DD
 
605
><P
 
606
>        Restore only those archive elements that are listed in <TT
 
607
CLASS="REPLACEABLE"
 
608
><I
 
609
>list-file</I
 
610
></TT
 
611
>, and restore them in the
 
612
        order they appear in the file.  Note that
 
613
        if filtering switches such as <TT
 
614
CLASS="OPTION"
 
615
>-n</TT
 
616
> or <TT
 
617
CLASS="OPTION"
 
618
>-t</TT
 
619
> are
 
620
        used with <TT
 
621
CLASS="OPTION"
 
622
>-L</TT
 
623
>, they will further restrict the items restored.
 
624
       </P
 
625
><P
 
626
>        <TT
 
627
CLASS="REPLACEABLE"
 
628
><I
 
629
>list-file</I
 
630
></TT
 
631
> is normally created by
 
632
        editing the output of a previous <TT
 
633
CLASS="OPTION"
 
634
>-l</TT
 
635
> operation.
 
636
        Lines can be moved or removed, and can also
 
637
        be commented out by placing a semicolon (<TT
 
638
CLASS="LITERAL"
 
639
>;</TT
 
640
>) at the
 
641
        start of the line.  See below for examples.
 
642
       </P
 
643
></DD
 
644
><DT
 
645
><TT
 
646
CLASS="OPTION"
 
647
>-n <TT
 
648
CLASS="REPLACEABLE"
 
649
><I
 
650
>namespace</I
 
651
></TT
 
652
></TT
 
653
><BR><TT
 
654
CLASS="OPTION"
 
655
>--schema=<TT
 
656
CLASS="REPLACEABLE"
 
657
><I
 
658
>schema</I
 
659
></TT
 
660
></TT
 
661
></DT
 
662
><DD
 
663
><P
 
664
>        Restore only objects that are in the named schema.  This can be
 
665
        combined with the <TT
 
666
CLASS="OPTION"
 
667
>-t</TT
 
668
> option to restore just a
 
669
        specific table.
 
670
       </P
 
671
></DD
 
672
><DT
 
673
><TT
 
674
CLASS="OPTION"
 
675
>-O</TT
 
676
><BR><TT
 
677
CLASS="OPTION"
 
678
>--no-owner</TT
 
679
></DT
 
680
><DD
 
681
><P
 
682
>        Do not output commands to set
 
683
        ownership of objects to match the original database.
 
684
        By default, <SPAN
 
685
CLASS="APPLICATION"
 
686
>pg_restore</SPAN
 
687
> issues
 
688
        <TT
 
689
CLASS="COMMAND"
 
690
>ALTER OWNER</TT
 
691
> or
 
692
        <TT
 
693
CLASS="COMMAND"
 
694
>SET SESSION AUTHORIZATION</TT
 
695
>
 
696
        statements to set ownership of created schema elements.
 
697
        These statements will fail unless the initial connection to the
 
698
        database is made by a superuser
 
699
        (or the same user that owns all of the objects in the script).
 
700
        With <TT
 
701
CLASS="OPTION"
 
702
>-O</TT
 
703
>, any user name can be used for the
 
704
        initial connection, and this user will own all the created objects.
 
705
       </P
 
706
></DD
 
707
><DT
 
708
><TT
 
709
CLASS="OPTION"
 
710
>--no-tablespaces</TT
 
711
></DT
 
712
><DD
 
713
><P
 
714
>        Do not output commands to select tablespaces.
 
715
        With this option, all objects will be created in whichever
 
716
        tablespace is the default during restore.
 
717
       </P
 
718
></DD
 
719
><DT
 
720
><TT
 
721
CLASS="OPTION"
 
722
>--no-security-label</TT
 
723
></DT
 
724
><DD
 
725
><P
 
726
>        Do not output commands to restore security labels,
 
727
        even if the archive contains them.
 
728
       </P
 
729
></DD
 
730
><DT
 
731
><TT
 
732
CLASS="OPTION"
 
733
>-P <TT
 
734
CLASS="REPLACEABLE"
 
735
><I
 
736
>function-name(argtype [, ...])</I
 
737
></TT
 
738
></TT
 
739
><BR><TT
 
740
CLASS="OPTION"
 
741
>--function=<TT
 
742
CLASS="REPLACEABLE"
 
743
><I
 
744
>function-name(argtype [, ...])</I
 
745
></TT
 
746
></TT
 
747
></DT
 
748
><DD
 
749
><P
 
750
>        Restore the named function only.  Be careful to spell the function
 
751
        name and arguments exactly as they appear in the dump file's table
 
752
        of contents.
 
753
       </P
 
754
></DD
 
755
><DT
 
756
><TT
 
757
CLASS="OPTION"
 
758
>-R</TT
 
759
><BR><TT
 
760
CLASS="OPTION"
 
761
>--no-reconnect</TT
 
762
></DT
 
763
><DD
 
764
><P
 
765
>        This option is obsolete but still accepted for backwards
 
766
        compatibility.
 
767
       </P
 
768
></DD
 
769
><DT
 
770
><TT
 
771
CLASS="OPTION"
 
772
>-s</TT
 
773
><BR><TT
 
774
CLASS="OPTION"
 
775
>--schema-only</TT
 
776
></DT
 
777
><DD
 
778
><P
 
779
>        Restore only the schema (data definitions), not the data (table
 
780
        contents).  Current sequence values will not be restored, either.
 
781
        (Do not confuse this with the <TT
 
782
CLASS="OPTION"
 
783
>--schema</TT
 
784
> option, which
 
785
        uses the word <SPAN
 
786
CLASS="QUOTE"
 
787
>"schema"</SPAN
 
788
> in a different meaning.)
 
789
       </P
 
790
></DD
 
791
><DT
 
792
><TT
 
793
CLASS="OPTION"
 
794
>-S <TT
 
795
CLASS="REPLACEABLE"
 
796
><I
 
797
>username</I
 
798
></TT
 
799
></TT
 
800
><BR><TT
 
801
CLASS="OPTION"
 
802
>--superuser=<TT
 
803
CLASS="REPLACEABLE"
 
804
><I
 
805
>username</I
 
806
></TT
 
807
></TT
 
808
></DT
 
809
><DD
 
810
><P
 
811
>        Specify the superuser user name to use when disabling triggers.
 
812
        This is only relevant if <TT
 
813
CLASS="OPTION"
 
814
>--disable-triggers</TT
 
815
> is used.
 
816
       </P
 
817
></DD
 
818
><DT
 
819
><TT
 
820
CLASS="OPTION"
 
821
>-t <TT
 
822
CLASS="REPLACEABLE"
 
823
><I
 
824
>table</I
 
825
></TT
 
826
></TT
 
827
><BR><TT
 
828
CLASS="OPTION"
 
829
>--table=<TT
 
830
CLASS="REPLACEABLE"
 
831
><I
 
832
>table</I
 
833
></TT
 
834
></TT
 
835
></DT
 
836
><DD
 
837
><P
 
838
>        Restore definition and/or data of named table only.  This can be
 
839
        combined with the <TT
 
840
CLASS="OPTION"
 
841
>-n</TT
 
842
> option to specify a schema.
 
843
       </P
 
844
></DD
 
845
><DT
 
846
><TT
 
847
CLASS="OPTION"
 
848
>-T <TT
 
849
CLASS="REPLACEABLE"
 
850
><I
 
851
>trigger</I
 
852
></TT
 
853
></TT
 
854
><BR><TT
 
855
CLASS="OPTION"
 
856
>--trigger=<TT
 
857
CLASS="REPLACEABLE"
 
858
><I
 
859
>trigger</I
 
860
></TT
 
861
></TT
 
862
></DT
 
863
><DD
 
864
><P
 
865
>        Restore named trigger only.
 
866
       </P
 
867
></DD
 
868
><DT
 
869
><TT
 
870
CLASS="OPTION"
 
871
>-v</TT
 
872
><BR><TT
 
873
CLASS="OPTION"
 
874
>--verbose</TT
 
875
></DT
 
876
><DD
 
877
><P
 
878
>        Specifies verbose mode.
 
879
       </P
 
880
></DD
 
881
><DT
 
882
><TT
 
883
CLASS="OPTION"
 
884
>-V</TT
 
885
><BR><TT
 
886
CLASS="OPTION"
 
887
>--version</TT
 
888
></DT
 
889
><DD
 
890
><P
 
891
>       Print the <SPAN
 
892
CLASS="APPLICATION"
 
893
>pg_restore</SPAN
 
894
> version and exit.
 
895
       </P
 
896
></DD
 
897
><DT
 
898
><TT
 
899
CLASS="OPTION"
 
900
>-x</TT
 
901
><BR><TT
 
902
CLASS="OPTION"
 
903
>--no-privileges</TT
 
904
><BR><TT
 
905
CLASS="OPTION"
 
906
>--no-acl</TT
 
907
></DT
 
908
><DD
 
909
><P
 
910
>        Prevent restoration of access privileges (grant/revoke commands).
 
911
       </P
 
912
></DD
 
913
><DT
 
914
><TT
 
915
CLASS="OPTION"
 
916
>--disable-triggers</TT
 
917
></DT
 
918
><DD
 
919
><P
 
920
>        This option is only relevant when performing a data-only restore.
 
921
        It instructs <SPAN
 
922
CLASS="APPLICATION"
 
923
>pg_restore</SPAN
 
924
> to execute commands
 
925
        to temporarily disable triggers on the target tables while
 
926
        the data is reloaded.  Use this if you have referential
 
927
        integrity checks or other triggers on the tables that you
 
928
        do not want to invoke during data reload.
 
929
       </P
 
930
><P
 
931
>        Presently, the commands emitted for
 
932
        <TT
 
933
CLASS="OPTION"
 
934
>--disable-triggers</TT
 
935
> must be done as superuser.  So, you
 
936
        should also specify a superuser name with <TT
 
937
CLASS="OPTION"
 
938
>-S</TT
 
939
>, or
 
940
        preferably run <SPAN
 
941
CLASS="APPLICATION"
 
942
>pg_restore</SPAN
 
943
> as a
 
944
        <SPAN
 
945
CLASS="PRODUCTNAME"
 
946
>PostgreSQL</SPAN
 
947
> superuser.
 
948
       </P
 
949
></DD
 
950
><DT
 
951
><TT
 
952
CLASS="OPTION"
 
953
>--use-set-session-authorization</TT
 
954
></DT
 
955
><DD
 
956
><P
 
957
>        Output SQL-standard <TT
 
958
CLASS="COMMAND"
 
959
>SET SESSION AUTHORIZATION</TT
 
960
> commands
 
961
        instead of <TT
 
962
CLASS="COMMAND"
 
963
>ALTER OWNER</TT
 
964
> commands to determine object
 
965
        ownership.  This makes the dump more standards-compatible, but
 
966
        depending on the history of the objects in the dump, might not restore
 
967
        properly.
 
968
       </P
 
969
></DD
 
970
><DT
 
971
><TT
 
972
CLASS="OPTION"
 
973
>--no-data-for-failed-tables</TT
 
974
></DT
 
975
><DD
 
976
><P
 
977
>        By default, table data is restored even if the creation command
 
978
        for the table failed (e.g., because it already exists).
 
979
        With this option, data for such a table is skipped.
 
980
        This behavior is useful if the target database already
 
981
        contains the desired table contents.  For example,
 
982
        auxiliary tables for <SPAN
 
983
CLASS="PRODUCTNAME"
 
984
>PostgreSQL</SPAN
 
985
> extensions
 
986
        such as <SPAN
 
987
CLASS="PRODUCTNAME"
 
988
>PostGIS</SPAN
 
989
> might already be loaded in
 
990
        the target database; specifying this option prevents duplicate
 
991
        or obsolete data from being loaded into them.
 
992
       </P
 
993
><P
 
994
>        This option is effective only when restoring directly into a
 
995
        database, not when producing SQL script output.
 
996
       </P
 
997
></DD
 
998
><DT
 
999
><TT
 
1000
CLASS="OPTION"
 
1001
>-1</TT
 
1002
><BR><TT
 
1003
CLASS="OPTION"
 
1004
>--single-transaction</TT
 
1005
></DT
 
1006
><DD
 
1007
><P
 
1008
>        Execute the restore as a single transaction (that is, wrap the
 
1009
        emitted commands in <TT
 
1010
CLASS="COMMAND"
 
1011
>BEGIN</TT
 
1012
>/<TT
 
1013
CLASS="COMMAND"
 
1014
>COMMIT</TT
 
1015
>).  This
 
1016
        ensures that either all the commands complete successfully, or no
 
1017
        changes are applied. This option implies
 
1018
        <TT
 
1019
CLASS="OPTION"
 
1020
>--exit-on-error</TT
 
1021
>.
 
1022
       </P
 
1023
></DD
 
1024
><DT
 
1025
><TT
 
1026
CLASS="OPTION"
 
1027
>-?</TT
 
1028
><BR><TT
 
1029
CLASS="OPTION"
 
1030
>--help</TT
 
1031
></DT
 
1032
><DD
 
1033
><P
 
1034
>       Show help about <SPAN
 
1035
CLASS="APPLICATION"
 
1036
>pg_restore</SPAN
 
1037
> command line
 
1038
       arguments, and exit.
 
1039
       </P
 
1040
></DD
 
1041
></DL
 
1042
></DIV
 
1043
><P>
 
1044
   </P
 
1045
><P
 
1046
>    <SPAN
 
1047
CLASS="APPLICATION"
 
1048
>pg_restore</SPAN
 
1049
> also accepts
 
1050
    the following command line arguments for connection parameters:
 
1051
 
 
1052
    <P
 
1053
></P
 
1054
></P><DIV
 
1055
CLASS="VARIABLELIST"
 
1056
><DL
 
1057
><DT
 
1058
><TT
 
1059
CLASS="OPTION"
 
1060
>-h <TT
 
1061
CLASS="REPLACEABLE"
 
1062
><I
 
1063
>host</I
 
1064
></TT
 
1065
></TT
 
1066
><BR><TT
 
1067
CLASS="OPTION"
 
1068
>--host=<TT
 
1069
CLASS="REPLACEABLE"
 
1070
><I
 
1071
>host</I
 
1072
></TT
 
1073
></TT
 
1074
></DT
 
1075
><DD
 
1076
><P
 
1077
>        Specifies the host name of the machine on which the server is
 
1078
        running.  If the value begins with a slash, it is used as the
 
1079
        directory for the Unix domain socket. The default is taken
 
1080
        from the <TT
 
1081
CLASS="ENVAR"
 
1082
>PGHOST</TT
 
1083
> environment variable, if set,
 
1084
        else a Unix domain socket connection is attempted.
 
1085
       </P
 
1086
></DD
 
1087
><DT
 
1088
><TT
 
1089
CLASS="OPTION"
 
1090
>-p <TT
 
1091
CLASS="REPLACEABLE"
 
1092
><I
 
1093
>port</I
 
1094
></TT
 
1095
></TT
 
1096
><BR><TT
 
1097
CLASS="OPTION"
 
1098
>--port=<TT
 
1099
CLASS="REPLACEABLE"
 
1100
><I
 
1101
>port</I
 
1102
></TT
 
1103
></TT
 
1104
></DT
 
1105
><DD
 
1106
><P
 
1107
>        Specifies the TCP port or local Unix domain socket file
 
1108
        extension on which the server is listening for connections.
 
1109
        Defaults to the <TT
 
1110
CLASS="ENVAR"
 
1111
>PGPORT</TT
 
1112
> environment variable, if
 
1113
        set, or a compiled-in default.
 
1114
        </P
 
1115
></DD
 
1116
><DT
 
1117
><TT
 
1118
CLASS="OPTION"
 
1119
>-U <TT
 
1120
CLASS="REPLACEABLE"
 
1121
><I
 
1122
>username</I
 
1123
></TT
 
1124
></TT
 
1125
><BR><TT
 
1126
CLASS="OPTION"
 
1127
>--username=<TT
 
1128
CLASS="REPLACEABLE"
 
1129
><I
 
1130
>username</I
 
1131
></TT
 
1132
></TT
 
1133
></DT
 
1134
><DD
 
1135
><P
 
1136
>        User name to connect as.
 
1137
       </P
 
1138
></DD
 
1139
><DT
 
1140
><TT
 
1141
CLASS="OPTION"
 
1142
>-w</TT
 
1143
><BR><TT
 
1144
CLASS="OPTION"
 
1145
>--no-password</TT
 
1146
></DT
 
1147
><DD
 
1148
><P
 
1149
>        Never issue a password prompt.  If the server requires
 
1150
        password authentication and a password is not available by
 
1151
        other means such as a <TT
 
1152
CLASS="FILENAME"
 
1153
>.pgpass</TT
 
1154
> file, the
 
1155
        connection attempt will fail.  This option can be useful in
 
1156
        batch jobs and scripts where no user is present to enter a
 
1157
        password.
 
1158
       </P
 
1159
></DD
 
1160
><DT
 
1161
><TT
 
1162
CLASS="OPTION"
 
1163
>-W</TT
 
1164
><BR><TT
 
1165
CLASS="OPTION"
 
1166
>--password</TT
 
1167
></DT
 
1168
><DD
 
1169
><P
 
1170
>        Force <SPAN
 
1171
CLASS="APPLICATION"
 
1172
>pg_restore</SPAN
 
1173
> to prompt for a
 
1174
        password before connecting to a database.
 
1175
       </P
 
1176
><P
 
1177
>        This option is never essential, since
 
1178
        <SPAN
 
1179
CLASS="APPLICATION"
 
1180
>pg_restore</SPAN
 
1181
> will automatically prompt
 
1182
        for a password if the server demands password authentication.
 
1183
        However, <SPAN
 
1184
CLASS="APPLICATION"
 
1185
>pg_restore</SPAN
 
1186
> will waste a
 
1187
        connection attempt finding out that the server wants a password.
 
1188
        In some cases it is worth typing <TT
 
1189
CLASS="OPTION"
 
1190
>-W</TT
 
1191
> to avoid the extra
 
1192
        connection attempt.
 
1193
       </P
 
1194
></DD
 
1195
><DT
 
1196
><TT
 
1197
CLASS="OPTION"
 
1198
>--role=<TT
 
1199
CLASS="REPLACEABLE"
 
1200
><I
 
1201
>rolename</I
 
1202
></TT
 
1203
></TT
 
1204
></DT
 
1205
><DD
 
1206
><P
 
1207
>        Specifies a role name to be used to perform the restore.
 
1208
        This option causes <SPAN
 
1209
CLASS="APPLICATION"
 
1210
>pg_restore</SPAN
 
1211
> to issue a
 
1212
        <TT
 
1213
CLASS="COMMAND"
 
1214
>SET ROLE</TT
 
1215
> <TT
 
1216
CLASS="REPLACEABLE"
 
1217
><I
 
1218
>rolename</I
 
1219
></TT
 
1220
>
 
1221
        command after connecting to the database. It is useful when the
 
1222
        authenticated user (specified by <TT
 
1223
CLASS="OPTION"
 
1224
>-U</TT
 
1225
>) lacks privileges
 
1226
        needed by <SPAN
 
1227
CLASS="APPLICATION"
 
1228
>pg_restore</SPAN
 
1229
>, but can switch to a role with
 
1230
        the required rights.  Some installations have a policy against
 
1231
        logging in directly as a superuser, and use of this option allows
 
1232
        restores to be performed without violating the policy.
 
1233
       </P
 
1234
></DD
 
1235
></DL
 
1236
></DIV
 
1237
><P>
 
1238
   </P
 
1239
></DIV
 
1240
><DIV
 
1241
CLASS="REFSECT1"
 
1242
><A
 
1243
NAME="AEN79861"
 
1244
></A
 
1245
><H2
 
1246
>Environment</H2
 
1247
><P
 
1248
></P
 
1249
><DIV
 
1250
CLASS="VARIABLELIST"
 
1251
><DL
 
1252
><DT
 
1253
><TT
 
1254
CLASS="ENVAR"
 
1255
>PGHOST</TT
 
1256
><BR><TT
 
1257
CLASS="ENVAR"
 
1258
>PGOPTIONS</TT
 
1259
><BR><TT
 
1260
CLASS="ENVAR"
 
1261
>PGPORT</TT
 
1262
><BR><TT
 
1263
CLASS="ENVAR"
 
1264
>PGUSER</TT
 
1265
></DT
 
1266
><DD
 
1267
><P
 
1268
>      Default connection parameters
 
1269
     </P
 
1270
></DD
 
1271
></DL
 
1272
></DIV
 
1273
><P
 
1274
>   This utility, like most other <SPAN
 
1275
CLASS="PRODUCTNAME"
 
1276
>PostgreSQL</SPAN
 
1277
> utilities,
 
1278
   also uses the environment variables supported by <SPAN
 
1279
CLASS="APPLICATION"
 
1280
>libpq</SPAN
 
1281
>
 
1282
   (see <A
 
1283
HREF="libpq-envars.html"
 
1284
>Section 31.13</A
 
1285
>).
 
1286
  </P
 
1287
></DIV
 
1288
><DIV
 
1289
CLASS="REFSECT1"
 
1290
><A
 
1291
NAME="APP-PGRESTORE-DIAGNOSTICS"
 
1292
></A
 
1293
><H2
 
1294
>Diagnostics</H2
 
1295
><P
 
1296
>   When a direct database connection is specified using the
 
1297
   <TT
 
1298
CLASS="OPTION"
 
1299
>-d</TT
 
1300
> option, <SPAN
 
1301
CLASS="APPLICATION"
 
1302
>pg_restore</SPAN
 
1303
>
 
1304
   internally executes <ACRONYM
 
1305
CLASS="ACRONYM"
 
1306
>SQL</ACRONYM
 
1307
> statements. If you have
 
1308
   problems running <SPAN
 
1309
CLASS="APPLICATION"
 
1310
>pg_restore</SPAN
 
1311
>, make sure
 
1312
   you are able to select information from the database using, for
 
1313
   example, <A
 
1314
HREF="app-psql.html"
 
1315
><SPAN
 
1316
CLASS="APPLICATION"
 
1317
>psql</SPAN
 
1318
></A
 
1319
>.  Also, any default connection
 
1320
   settings and environment variables used by the
 
1321
   <SPAN
 
1322
CLASS="APPLICATION"
 
1323
>libpq</SPAN
 
1324
> front-end library will apply.
 
1325
  </P
 
1326
></DIV
 
1327
><DIV
 
1328
CLASS="REFSECT1"
 
1329
><A
 
1330
NAME="APP-PGRESTORE-NOTES"
 
1331
></A
 
1332
><H2
 
1333
>Notes</H2
 
1334
><P
 
1335
>   If your installation has any local additions to the
 
1336
   <TT
 
1337
CLASS="LITERAL"
 
1338
>template1</TT
 
1339
> database, be careful to load the output of
 
1340
   <SPAN
 
1341
CLASS="APPLICATION"
 
1342
>pg_restore</SPAN
 
1343
> into a truly empty database;
 
1344
   otherwise you are likely to get errors due to duplicate definitions
 
1345
   of the added objects.  To make an empty database without any local
 
1346
   additions, copy from <TT
 
1347
CLASS="LITERAL"
 
1348
>template0</TT
 
1349
> not <TT
 
1350
CLASS="LITERAL"
 
1351
>template1</TT
 
1352
>, for example:
 
1353
</P><PRE
 
1354
CLASS="PROGRAMLISTING"
 
1355
>CREATE DATABASE foo WITH TEMPLATE template0;</PRE
 
1356
><P>
 
1357
  </P
 
1358
><P
 
1359
>   The limitations of <SPAN
 
1360
CLASS="APPLICATION"
 
1361
>pg_restore</SPAN
 
1362
> are detailed below.
 
1363
 
 
1364
   <P
 
1365
></P
 
1366
></P><UL
 
1367
><LI
 
1368
><P
 
1369
>      When restoring data to a pre-existing table and the option
 
1370
      <TT
 
1371
CLASS="OPTION"
 
1372
>--disable-triggers</TT
 
1373
> is used,
 
1374
      <SPAN
 
1375
CLASS="APPLICATION"
 
1376
>pg_restore</SPAN
 
1377
> emits commands
 
1378
      to disable triggers on user tables before inserting the data, then emits commands to
 
1379
      re-enable them after the data has been inserted.  If the restore is stopped in the
 
1380
      middle, the system catalogs might be left in the wrong state.
 
1381
     </P
 
1382
></LI
 
1383
><LI
 
1384
><P
 
1385
>      <SPAN
 
1386
CLASS="APPLICATION"
 
1387
>pg_restore</SPAN
 
1388
> cannot restore large objects
 
1389
      selectively;  for instance, only those for a specific table.  If
 
1390
      an archive contains large objects, then all large objects will be
 
1391
      restored, or none of them if they are excluded via <TT
 
1392
CLASS="OPTION"
 
1393
>-L</TT
 
1394
>,
 
1395
      <TT
 
1396
CLASS="OPTION"
 
1397
>-t</TT
 
1398
>, or other options.
 
1399
     </P
 
1400
></LI
 
1401
></UL
 
1402
><P>
 
1403
  </P
 
1404
><P
 
1405
>   See also the <A
 
1406
HREF="app-pgdump.html"
 
1407
>pg_dump</A
 
1408
> documentation for details on
 
1409
   limitations of <SPAN
 
1410
CLASS="APPLICATION"
 
1411
>pg_dump</SPAN
 
1412
>.
 
1413
  </P
 
1414
><P
 
1415
>   Once restored, it is wise to run <TT
 
1416
CLASS="COMMAND"
 
1417
>ANALYZE</TT
 
1418
> on each
 
1419
   restored table so the optimizer has useful statistics; see
 
1420
   <A
 
1421
HREF="routine-vacuuming.html#VACUUM-FOR-STATISTICS"
 
1422
>Section 23.1.3</A
 
1423
> and
 
1424
   <A
 
1425
HREF="routine-vacuuming.html#AUTOVACUUM"
 
1426
>Section 23.1.5</A
 
1427
> for more information.
 
1428
  </P
 
1429
></DIV
 
1430
><DIV
 
1431
CLASS="REFSECT1"
 
1432
><A
 
1433
NAME="APP-PGRESTORE-EXAMPLES"
 
1434
></A
 
1435
><H2
 
1436
>Examples</H2
 
1437
><P
 
1438
>   Assume we have dumped a database called <TT
 
1439
CLASS="LITERAL"
 
1440
>mydb</TT
 
1441
> into a
 
1442
   custom-format dump file:
 
1443
 
 
1444
</P><PRE
 
1445
CLASS="SCREEN"
 
1446
><SAMP
 
1447
CLASS="PROMPT"
 
1448
>$</SAMP
 
1449
> <KBD
 
1450
CLASS="USERINPUT"
 
1451
>pg_dump -Fc mydb &gt; db.dump</KBD
 
1452
></PRE
 
1453
><P>
 
1454
  </P
 
1455
><P
 
1456
>   To drop the database and recreate it from the dump:
 
1457
 
 
1458
</P><PRE
 
1459
CLASS="SCREEN"
 
1460
><SAMP
 
1461
CLASS="PROMPT"
 
1462
>$</SAMP
 
1463
> <KBD
 
1464
CLASS="USERINPUT"
 
1465
>dropdb mydb</KBD
 
1466
>
 
1467
<SAMP
 
1468
CLASS="PROMPT"
 
1469
>$</SAMP
 
1470
> <KBD
 
1471
CLASS="USERINPUT"
 
1472
>pg_restore -C -d postgres db.dump</KBD
 
1473
></PRE
 
1474
><P>
 
1475
 
 
1476
   The database named in the <TT
 
1477
CLASS="OPTION"
 
1478
>-d</TT
 
1479
> switch can be any database existing
 
1480
   in the cluster; <SPAN
 
1481
CLASS="APPLICATION"
 
1482
>pg_restore</SPAN
 
1483
> only uses it to issue the
 
1484
   <TT
 
1485
CLASS="COMMAND"
 
1486
>CREATE DATABASE</TT
 
1487
> command for <TT
 
1488
CLASS="LITERAL"
 
1489
>mydb</TT
 
1490
>.  With
 
1491
   <TT
 
1492
CLASS="OPTION"
 
1493
>-C</TT
 
1494
>, data is always restored into the database name that appears
 
1495
   in the dump file.
 
1496
  </P
 
1497
><P
 
1498
>   To reload the dump into a new database called <TT
 
1499
CLASS="LITERAL"
 
1500
>newdb</TT
 
1501
>:
 
1502
 
 
1503
</P><PRE
 
1504
CLASS="SCREEN"
 
1505
><SAMP
 
1506
CLASS="PROMPT"
 
1507
>$</SAMP
 
1508
> <KBD
 
1509
CLASS="USERINPUT"
 
1510
>createdb -T template0 newdb</KBD
 
1511
>
 
1512
<SAMP
 
1513
CLASS="PROMPT"
 
1514
>$</SAMP
 
1515
> <KBD
 
1516
CLASS="USERINPUT"
 
1517
>pg_restore -d newdb db.dump</KBD
 
1518
></PRE
 
1519
><P>
 
1520
 
 
1521
   Notice we don't use <TT
 
1522
CLASS="OPTION"
 
1523
>-C</TT
 
1524
>, and instead connect directly to the
 
1525
   database to be restored into.  Also note that we clone the new database
 
1526
   from <TT
 
1527
CLASS="LITERAL"
 
1528
>template0</TT
 
1529
> not <TT
 
1530
CLASS="LITERAL"
 
1531
>template1</TT
 
1532
>, to ensure it is
 
1533
   initially empty.
 
1534
  </P
 
1535
><P
 
1536
>   To reorder database items, it is first necessary to dump the table of
 
1537
   contents of the archive:
 
1538
</P><PRE
 
1539
CLASS="SCREEN"
 
1540
><SAMP
 
1541
CLASS="PROMPT"
 
1542
>$</SAMP
 
1543
> <KBD
 
1544
CLASS="USERINPUT"
 
1545
>pg_restore -l db.dump &gt; db.list</KBD
 
1546
></PRE
 
1547
><P>
 
1548
   The listing file consists of a header and one line for each item, e.g.:
 
1549
</P><PRE
 
1550
CLASS="PROGRAMLISTING"
 
1551
>;
 
1552
; Archive created at Mon Sep 14 13:55:39 2009
 
1553
;     dbname: DBDEMOS
 
1554
;     TOC Entries: 81
 
1555
;     Compression: 9
 
1556
;     Dump Version: 1.10-0
 
1557
;     Format: CUSTOM
 
1558
;     Integer: 4 bytes
 
1559
;     Offset: 8 bytes
 
1560
;     Dumped from database version: 8.3.5
 
1561
;     Dumped by pg_dump version: 8.3.8
 
1562
;
 
1563
;
 
1564
; Selected TOC Entries:
 
1565
;
 
1566
3; 2615 2200 SCHEMA - public pasha
 
1567
1861; 0 0 COMMENT - SCHEMA public pasha
 
1568
1862; 0 0 ACL - public pasha
 
1569
317; 1247 17715 TYPE public composite pasha
 
1570
319; 1247 25899 DOMAIN public domain0 pasha</PRE
 
1571
><P>
 
1572
   Semicolons start a comment, and the numbers at the start of lines refer to the
 
1573
   internal archive ID assigned to each item.
 
1574
  </P
 
1575
><P
 
1576
>   Lines in the file can be commented out, deleted, and reordered. For example:
 
1577
</P><PRE
 
1578
CLASS="PROGRAMLISTING"
 
1579
>10; 145433 TABLE map_resolutions postgres
 
1580
;2; 145344 TABLE species postgres
 
1581
;4; 145359 TABLE nt_header postgres
 
1582
6; 145402 TABLE species_records postgres
 
1583
;8; 145416 TABLE ss_old postgres</PRE
 
1584
><P>
 
1585
   could be used as input to <SPAN
 
1586
CLASS="APPLICATION"
 
1587
>pg_restore</SPAN
 
1588
> and would only restore
 
1589
   items 10 and 6, in that order:
 
1590
</P><PRE
 
1591
CLASS="SCREEN"
 
1592
><SAMP
 
1593
CLASS="PROMPT"
 
1594
>$</SAMP
 
1595
> <KBD
 
1596
CLASS="USERINPUT"
 
1597
>pg_restore -L db.list db.dump</KBD
 
1598
></PRE
 
1599
><P>
 
1600
  </P
 
1601
></DIV
 
1602
><DIV
 
1603
CLASS="REFSECT1"
 
1604
><A
 
1605
NAME="AEN79954"
 
1606
></A
 
1607
><H2
 
1608
>See Also</H2
 
1609
><A
 
1610
HREF="app-pgdump.html"
 
1611
>pg_dump</A
 
1612
>, <A
 
1613
HREF="app-pg-dumpall.html"
 
1614
><SPAN
 
1615
CLASS="APPLICATION"
 
1616
>pg_dumpall</SPAN
 
1617
></A
 
1618
>, <A
 
1619
HREF="app-psql.html"
 
1620
><SPAN
 
1621
CLASS="APPLICATION"
 
1622
>psql</SPAN
 
1623
></A
 
1624
></DIV
 
1625
><DIV
 
1626
CLASS="NAVFOOTER"
 
1627
><HR
 
1628
ALIGN="LEFT"
 
1629
WIDTH="100%"><TABLE
 
1630
SUMMARY="Footer navigation table"
 
1631
WIDTH="100%"
 
1632
BORDER="0"
 
1633
CELLPADDING="0"
 
1634
CELLSPACING="0"
 
1635
><TR
 
1636
><TD
 
1637
WIDTH="33%"
 
1638
ALIGN="left"
 
1639
VALIGN="top"
 
1640
><A
 
1641
HREF="app-pg-dumpall.html"
 
1642
ACCESSKEY="P"
 
1643
>Prev</A
 
1644
></TD
 
1645
><TD
 
1646
WIDTH="34%"
 
1647
ALIGN="center"
 
1648
VALIGN="top"
 
1649
><A
 
1650
HREF="index.html"
 
1651
ACCESSKEY="H"
 
1652
>Home</A
 
1653
></TD
 
1654
><TD
 
1655
WIDTH="33%"
 
1656
ALIGN="right"
 
1657
VALIGN="top"
 
1658
><A
 
1659
HREF="app-psql.html"
 
1660
ACCESSKEY="N"
 
1661
>Next</A
 
1662
></TD
 
1663
></TR
 
1664
><TR
 
1665
><TD
 
1666
WIDTH="33%"
 
1667
ALIGN="left"
 
1668
VALIGN="top"
 
1669
><SPAN
 
1670
CLASS="APPLICATION"
 
1671
>pg_dumpall</SPAN
 
1672
></TD
 
1673
><TD
 
1674
WIDTH="34%"
 
1675
ALIGN="center"
 
1676
VALIGN="top"
 
1677
><A
 
1678
HREF="reference-client.html"
 
1679
ACCESSKEY="U"
 
1680
>Up</A
 
1681
></TD
 
1682
><TD
 
1683
WIDTH="33%"
 
1684
ALIGN="right"
 
1685
VALIGN="top"
 
1686
><SPAN
 
1687
CLASS="APPLICATION"
 
1688
>psql</SPAN
 
1689
></TD
 
1690
></TR
 
1691
></TABLE
 
1692
></DIV
 
1693
></BODY
 
1694
></HTML
 
1695
>
 
 
b'\\ No newline at end of file'