public inbox for [email protected]
help / color / mirror / Atom feedpg_dump
2+ messages / 2 participants
[nested] [flat]
* pg_dump
@ 2005-11-11 23:04 Judith Altamirano Figueroa <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Judith Altamirano Figueroa @ 2005-11-11 23:04 UTC (permalink / raw)
To: [email protected]
Hi
how could I restore a db if I did next:
pg_dump -Z 9 soi > $DESTINO/soi.bkp
Thanks in advanced
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [SQL] pg_dump
@ 2005-11-15 12:01 Oliver Elphick <[email protected]>
parent: Judith Altamirano Figueroa <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Elphick @ 2005-11-15 12:01 UTC (permalink / raw)
To: Judith Altamirano Figueroa <[email protected]>; +Cc: pgsql-docs; [email protected]
On Fri, 2005-11-11 at 17:04 -0600, Judith Altamirano Figueroa wrote:
> Hi
>
> how could I restore a db if I did next:
>
> pg_dump -Z 9 soi > $DESTINO/soi.bkp
Since you don't specify any dump format, your dump should be plain text
and is compressed with gzip, so the restore command is going to be:
zcat $DESTINO/soi.bkp | psql -d restore_database_name -f -
You have to create the database to restore into first.
------------------------------------------
[Note for documentation:
According to the psql man page:
-Z 0..9
--compress=0..9
Specify the compression level to use in archive formats that
support compression. (Currently only the custom archive format
supports compression.)
However using psql -Z with no format or with "-F p" in fact produces a
gzipped file.]
This might be a suitable amendment to the docs?:
$ diff -u /tmp/pg_dump.sgml.orig /tmp/pg_dump.sgml
--- /tmp/pg_dump.sgml.orig 2005-11-15 11:50:55.000000000 +0000
+++ /tmp/pg_dump.sgml 2005-11-15 11:57:38.000000000 +0000
@@ -492,8 +492,9 @@
<listitem>
<para>
Specify the compression level to use in archive formats that
- support compression. (Currently only the custom archive
- format supports compression.)
+ support compression. (Currently the tar archive
+ format does not support compression. The plain text format is
+ compressed with gzip.)
</para>
</listitem>
</varlistentry>
--
Oliver Elphick [email protected]
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
Do you want to know God? http://www.lfix.co.uk/knowing_god.html
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-11-15 12:01 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-11-11 23:04 pg_dump Judith Altamirano Figueroa <[email protected]>
2005-11-15 12:01 ` Oliver Elphick <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox