From sakaitena@yahoo.com Tue May 18 23:14:58 2010 Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 765966324EB for ; Tue, 18 May 2010 20:14:58 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 15629-02 for ; Tue, 18 May 2010 23:14:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from web51901.mail.re2.yahoo.com (web51901.mail.re2.yahoo.com [206.190.48.64]) by mail.postgresql.org (Postfix) with SMTP id D24A8632297 for ; Tue, 18 May 2010 20:14:50 -0300 (ADT) Received: (qmail 64867 invoked by uid 60001); 18 May 2010 23:14:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1274224489; bh=hgtp/Hp8aLnEMWtKuBBpzahDJEmhuccz2WFwvl/tTA4=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=YK9CUW59NJwtBpo806psddjI6LV/tdLR4pP3s2950RnrTafpCxDy/eQNmypTn2764q6sw6Y10KVXQiB+ikUkwnaTt1Ftj6T7u84dqUZyhoYsOcQjB6joOzXoMsccJ85Pw6aM1DCldJsaF3ollpORt0Jo9Pa6LtVwdVi36DHbaWU= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=Va3yWxTvEaVpSwPOA/7wc/wcwtC32wZSu3nxs+Fh8wf9YEe/KuICJX4dZkXEJs94khu0rwZPTXtOYGmhELHiUa1n0WWy4IQ3nDd4nFUpYuQg9YOqVYRuCiPlW1I6cRvz7sCG0dPq1ig88RYVIEEfxTgtq/qgxj0+MvSvnVvpjsg=; Message-ID: <384163.64826.qm@web51901.mail.re2.yahoo.com> X-YMail-OSG: Ip7YCcMVM1mF6wDdRXahqf2U5ov86rc2gagVwOHTuAFbXtB jXOXDfesZXyfjE_YmmFDNPnrw8Q96cLrSbfczBijQg7aXCYOnyqm7Xi6XHRB BYOVG3spKA8rv1gv0coPci07HdfXN3kk3CRSv.PZOtFklvJx.FWE4zkZvGw. WBg6CxanZMfITLqgFnPHcYj29fqJCCnXYwrKU6NzBJ9LNHdT_wqE3oIET6gG 4YCZffhxUC3PdVoMA8gj8WutKG7Lx6.9OLtCqc0ZAandT20CTTJHB3Cf7szM BGwLm8vTyj_tRda70ZY4YYfHtL0o- Received: from [63.193.205.1] by web51901.mail.re2.yahoo.com via HTTP; Tue, 18 May 2010 16:14:49 PDT X-Mailer: YahooMailClassic/11.0.8 YahooMailWebService/0.8.103.269680 Date: Tue, 18 May 2010 16:14:49 -0700 (PDT) From: Tena Sakai Subject: troubled by pg_dump and pg_restore To: pgsql-admin@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-78956169-1274224489=:64826" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.509 tagged_above=-10 required=5 tests=BAYES_05=-0.5, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/170 X-Sequence-Number: 34643 --0-78956169-1274224489=:64826 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi Everybody, I am a bit troubled by pg_dump and pg_restore.=A0 My platform is redhat linux, Del 64 bit hardware, running postgres 8.3.7. I have a database named canon and I want to move a schema full of tables from canon to a new database named musket.=A0 The schema I am interested in is called tsakai.=A0 Here's what I have done: =A0 $ env | grep PG =A0 PGUSER=3Dpostgres =A0 PGDATABASE=3Dcanon =A0 PGHOST=3Dlocalhost =A0 PGDATA=3D/usr/local/pgsql/data =A0 $ =A0 $ pg_dump -n tsakai > canon_tsakai.sql =A0 $ =A0 $ echo $? =A0 0 =A0 $ =A0 $ pg_restore -l canon_tsakai.sql =A0 pg_restore: [archiver] input file does not appear to be a valid archive =A0 $=20 =A0 $ pg_restore -d musket canon_tsakai.sql =A0 pg_restore: [archiver] input file does not appear to be a valid archive Can someone please tell me (1) if there is anything wrong with my invocatio= n of pd_dump?=A0 (I want to generate a file pd_restore can use to feed to musket database.)=A0 (2) Why pg_restore wouldn't give me listing?=A0 And (3= ) why the second pg_restore command is upset? Thank you. Regards, Tena sakai --0-78956169-1274224489=:64826 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Everybody,

I am a bit troubled by p= g_dump and pg_restore.  My platform is
redhat linux, Del 64 bit har= dware, running postgres 8.3.7.
I have a database named canon and I want = to move a schema full of
tables from canon to a new database named muske= t.  The schema I
am interested in is called tsakai.  Here's wh= at I have done:

  $ env | grep PG
  PGUSER=3Dpostgres  PGDATABASE=3Dcanon
  PGHOST=3Dlocalhost
  PGDATA= =3D/usr/local/pgsql/data
  $
  $ pg_dump -n tsakai > can= on_tsakai.sql
  $
  $ echo $?
  0
  $
&n= bsp; $ pg_restore -l canon_tsakai.sql
  pg_restore: [archiver] inpu= t file does not appear to be a valid archive
  $
  $ pg_re= store -d musket canon_tsakai.sql
  pg_restore: [archiver] input fil= e does not appear to be a valid archive

Can someone please tell me (1) if ther= e is anything wrong with my invocation
of pd_dump?  (I want to gene= rate a file pd_restore can use to feed to
musket database.)  (2) Wh= y pg_restore wouldn't give me listing?  And (3)
why the second pg_r= estore command is upset?

Thank you.

Regards,

Tena saka= i
--0-78956169-1274224489=:64826-- From rosser.schwarz@gmail.com Tue May 18 23:21:02 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9EB27632752 for ; Tue, 18 May 2010 20:21:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 46289-02 for ; Tue, 18 May 2010 23:20:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f196.google.com (mail-qy0-f196.google.com [209.85.221.196]) by mail.postgresql.org (Postfix) with ESMTP id 5116C63224D for ; Tue, 18 May 2010 20:20:55 -0300 (ADT) Received: by qyk34 with SMTP id 34so9544176qyk.10 for ; Tue, 18 May 2010 16:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=qVDiseTbap+mICSYg5io+FwUJX2EaKbuhthVR8HY1w8=; b=RY18hcAfU+2z1Nkh+wnXCirsHA3VyqErKVQwzYhRakSTJwGiRX7gUsYrr8yFnWSmyW 1qguAYA32Jvb1HcbI0GA8h7qe6xKw4DLyUsD9NPMj5uwJvHXeoxWjfQOEKGBjy9hzLEb +n5YUYSNkdxjC3IsWqS06+Ug7LnKbruoEgW34= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ordY12wwuCB5KpyjToUQ3WhkjsIikDzZbHKPjzxbmCjhzFMciLf+AlBmQ4XDIe0GUA cRPdgYqw4tn4KrDrHiUHz9FxiWHJoCXGCcUjdje5mOFKWK1qeo7w4Hyc5g/2a6m3fGoZ +OF5oyi8Af2SF1wJuDRuVDq3jGyeQ3zVIGQ+o= MIME-Version: 1.0 Received: by 10.224.72.72 with SMTP id l8mr4224110qaj.165.1274224853303; Tue, 18 May 2010 16:20:53 -0700 (PDT) Received: by 10.229.184.16 with HTTP; Tue, 18 May 2010 16:20:53 -0700 (PDT) In-Reply-To: <384163.64826.qm@web51901.mail.re2.yahoo.com> References: <384163.64826.qm@web51901.mail.re2.yahoo.com> Date: Tue, 18 May 2010 17:20:53 -0600 Message-ID: Subject: Re: troubled by pg_dump and pg_restore From: Rosser Schwarz To: Tena Sakai Cc: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=001636137b0cbec9e80486e697c0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201005/171 X-Sequence-Number: 34644 --001636137b0cbec9e80486e697c0 Content-Type: text/plain; charset=ISO-8859-1 On Tue, May 18, 2010 at 5:14 PM, Tena Sakai wrote: > > Can someone please tell me (1) if there is anything wrong with my > invocation > of pd_dump? (I want to generate a file pd_restore can use to feed to > musket database.) (2) Why pg_restore wouldn't give me listing? And (3) > why the second pg_restore command is upset? > Someone please correct me if I'm wrong, but I believe -l only makes sense in the context of a dump created with -Fc. For SQL format dumps, I usually just cat or \i them into psql. rls -- :wq --001636137b0cbec9e80486e697c0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, May 18, 2010 at 5:14 PM, Tena Sakai <sakaitena@yahoo.com> wrote:
<= /table>

Someone please correct me if = I'm wrong, but I believe -l only makes sense in the context of a dump c= reated with -Fc. =A0For SQL format dumps, I usually just cat or \i them int= o psql.

rls

--
:wq
--001636137b0cbec9e80486e697c0-- From SStearns@internode.com.au Tue May 18 23:25:08 2010 Received: from maia.hub.org (maia-4.hub.org [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 4032963347D for ; Tue, 18 May 2010 20:25:08 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 89949-01 for ; Tue, 18 May 2010 23:24:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from imail.internode.com.au (exchht02-ext.internode.com.au [203.26.95.186]) by mail.postgresql.org (Postfix) with ESMTP id A84316333C4 for ; Tue, 18 May 2010 20:24:58 -0300 (ADT) Received: from EXCHMAIL.staff.internode.com.au ([169.254.1.229]) by exchht02.staff.internode.com.au ([fe80::db2:3e78:2ae:9bfb%12]) with mapi; Wed, 19 May 2010 08:54:53 +0930 From: Samuel Stearns To: Tena Sakai , "pgsql-admin@postgresql.org" Date: Wed, 19 May 2010 08:54:52 +0930 Subject: Re: troubled by pg_dump and pg_restore Thread-Topic: [ADMIN] troubled by pg_dump and pg_restore Thread-Index: Acr23/xxOBqUE4X6Qcq/UwgPm2XpTgAANXEg Message-ID: <68B59BEDCD36854AADBDF17E91B2937A01A54D117E@EXCHMAIL.staff.internode.com.au> References: <384163.64826.qm@web51901.mail.re2.yahoo.com> In-Reply-To: <384163.64826.qm@web51901.mail.re2.yahoo.com> Accept-Language: en-US, en-AU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-AU Content-Type: multipart/alternative; boundary="_000_68B59BEDCD36854AADBDF17E91B2937A01A54D117EEXCHMAILstaff_" MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/172 X-Sequence-Number: 34645 --_000_68B59BEDCD36854AADBDF17E91B2937A01A54D117EEXCHMAILstaff_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Try this: pg_dump -n tsakai canon | psql musket Sam ________________________________ From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql= .org] On Behalf Of Tena Sakai Sent: Wednesday, 19 May 2010 8:45 AM To: pgsql-admin@postgresql.org Subject: [ADMIN] troubled by pg_dump and pg_restore Hi Everybody, I am a bit troubled by pg_dump and pg_restore. My platform is redhat linux, Del 64 bit hardware, running postgres 8.3.7. I have a database named canon and I want to move a schema full of tables from canon to a new database named musket. The schema I am interested in is called tsakai. Here's what I have done: $ env | grep PG PGUSER=3Dpostgres PGDATABASE=3Dcanon PGHOST=3Dlocalhost PGDATA=3D/usr/local/pgsql/data $ $ pg_dump -n tsakai > canon_tsakai.sql $ $ echo $? 0 $ $ pg_restore -l canon_tsakai.sql pg_restore: [archiver] input file does not appear to be a valid archive $ $ pg_restore -d musket canon_tsakai.sql pg_restore: [archiver] input file does not appear to be a valid archive Can someone please tell me (1) if there is anything wrong with my invocatio= n of pd_dump? (I want to generate a file pd_restore can use to feed to musket database.) (2) Why pg_restore wouldn't give me listing? And (3) why the second pg_restore command is upset? Thank you. Regards, Tena sakai --_000_68B59BEDCD36854AADBDF17E91B2937A01A54D117EEXCHMAILstaff_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Try this:

 

pg_dump –n tsakai canon | psql musket

 

Sam

 


From:= pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] = On Behalf Of Tena Sakai
Sent: Wednesday, 19 May 2010= 8:45 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] troubled by pg_dump and pg_restore

 


Can someone please tell me (1) if the= re is anything wrong with my invocation
of pd_dump?=A0 (I want to genera= te a file pd_restore can use to feed to
musket database.)=A0 (2) Why pg_restore wouldn't give me listing?=A0 An= d (3)
why the second pg_restore command is upset?

Hi Everybody,

I am a bit troubled by pg_dump and pg_restore.  My platform is
redhat linux, Del 64 bit hardware, running postgres 8.3.7.
I have a database named canon and I want to move a schema full of
tables from canon to a new database named musket.  The schema I
am interested in is called tsakai.  Here's what I have done:

  $ env | grep PG
  PGUSER=3Dpostgres
  PGDATABASE=3Dcanon
  PGHOST=3Dlocalhost
  PGDATA=3D/usr/local/pgsql/data
  $
  $ pg_dump -n tsakai > canon_tsakai.sql
  $
  $ echo $?
  0
  $
  $ pg_restore -l canon_tsakai.sql
  pg_restore: [archiver] input file does not appear to be a valid archive
  $
  $ pg_restore -d musket canon_tsakai.sql
  pg_restore: [archiver] input file does not appear to be a valid archive

Can someone please tell me (1) if there is anything wrong with my invocat= ion
of pd_dump?  (I want to generate a file pd_restore can use to feed t= o
musket database.)  (2) Why pg_restore wouldn't give me listing? = ; And (3)
why the second pg_restore command is upset?

Thank you.

Regards,

Tena sakai

 

--_000_68B59BEDCD36854AADBDF17E91B2937A01A54D117EEXCHMAILstaff_-- From scott.marlowe@gmail.com Tue May 18 23:26:34 2010 Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id B9BE7632688 for ; Tue, 18 May 2010 20:26:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 77422-03 for ; Tue, 18 May 2010 23:26:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gy0-f174.google.com (mail-gy0-f174.google.com [209.85.160.174]) by mail.postgresql.org (Postfix) with ESMTP id BE78963224D for ; Tue, 18 May 2010 20:26:27 -0300 (ADT) Received: by gyg13 with SMTP id 13so3145150gyg.19 for ; Tue, 18 May 2010 16:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lnHGwbuB0d2sEmnRehsnFcDj8XUMmqnZe2UKofd1jzU=; b=XUT2IFBk+Or7ykGHGQ2BffvrIciJc7wUqCnKuam41uip8Y+DMR5N59ZjClTMpRI1hs BHME5hoRHv77ODtskieKU/KWCJaFMjqDnbrnHUJVWsBuM16b69f4/x89FKArTMm735fk wrTeSVCk+Chm0v70/FCxvyEeXdQTpuimo2AY8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=JYLteu1e0L9rtx6r7Z4gCfxZ1kNqziSbGF01eohJy6ywVP0Uo01OwdQqPr7Ak7TANg kfbt3sqk8CygaK1gIYA2ONEODIEI/m8LECmdPmeYcztEw1VWTVVoqfk8haZN89qe2QZG KDyVpG82nl1tEqeaSFGevq8g/DwLot3okqKhQ= MIME-Version: 1.0 Received: by 10.151.129.12 with SMTP id g12mr8006240ybn.147.1274225184802; Tue, 18 May 2010 16:26:24 -0700 (PDT) Received: by 10.150.185.5 with HTTP; Tue, 18 May 2010 16:26:24 -0700 (PDT) In-Reply-To: <384163.64826.qm@web51901.mail.re2.yahoo.com> References: <384163.64826.qm@web51901.mail.re2.yahoo.com> Date: Tue, 18 May 2010 17:26:24 -0600 Message-ID: Subject: Re: troubled by pg_dump and pg_restore From: Scott Marlowe To: Tena Sakai Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201005/173 X-Sequence-Number: 34646 (Please stick to plain text posts, as many readers can't read html or the formatting gets screwy. This is a plain text mailing list in general. Attachments are ok tho) On Tue, May 18, 2010 at 5:14 PM, Tena Sakai wrote: > > Hi Everybody, > > I am a bit troubled by pg_dump and pg_restore.=A0 My platform is > redhat linux, Del 64 bit hardware, running postgres 8.3.7. > I have a database named canon and I want to move a schema full of > tables from canon to a new database named musket.=A0 The schema I > am interested in is called tsakai.=A0 Here's what I have done: > > =A0 $ env | grep PG > =A0 PGUSER=3Dpostgres > =A0 PGDATABASE=3Dcanon > =A0 PGHOST=3Dlocalhost > =A0 PGDATA=3D/usr/local/pgsql/data > =A0 $ > =A0 $ pg_dump -n tsakai > canon_tsakai.sql > =A0 $ > =A0 $ echo $? > =A0 0 > =A0 $ > =A0 $ pg_restore -l canon_tsakai.sql > =A0 pg_restore: [archiver] input file does not appear to be a valid archi= ve > =A0 $ > =A0 $ pg_restore -d musket canon_tsakai.sql > =A0 pg_restore: [archiver] input file does not appear to be a valid archi= ve > > Can someone please tell me (1) if there is anything wrong with my invocat= ion > of pd_dump?=A0 (I want to generate a file pd_restore can use to feed to > musket database.)=A0 (2) Why pg_restore wouldn't give me listing?=A0 And = (3) > why the second pg_restore command is upset? pg_restore expects custom format from pg_dump. For plain sql files, use p= sql: psql mydb -f mysql.sql From tsakai@gallo.ucsf.edu Tue May 18 23:45:54 2010 Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id AEC886321F0 for ; Tue, 18 May 2010 20:45:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 16395-04 for ; Tue, 18 May 2010 23:45:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.egcrc.net (mail.egcrc.net [63.193.204.10]) by mail.postgresql.org (Postfix) with ESMTP id 7359E632752 for ; Tue, 18 May 2010 20:45:45 -0300 (ADT) Received: from EGCRC-EX04.egcrc.org ([::1]) by EGCRC-EX03.egcrc.org ([fe80::5c82:4343:5244:a0d5%11]) with mapi; Tue, 18 May 2010 16:45:43 -0700 From: Tena Sakai To: Scott Marlowe , Tena Sakai CC: "pgsql-admin@postgresql.org" Date: Tue, 18 May 2010 16:43:18 -0700 Subject: Re: troubled by pg_dump and pg_restore Thread-Topic: [ADMIN] troubled by pg_dump and pg_restore Thread-Index: Acr24Zw0gdjoVeA/TAi3XMl6fS4cSwAAkf+V Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-Entourage/13.4.0.100208 acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201005/174 X-Sequence-Number: 34647 Many thanks, Rosser, Sam, and Scott. Regards, Tena Sakai tsakai@gallo.ucsf.edu On 5/18/10 4:26 PM, "Scott Marlowe" wrote: > (Please stick to plain text posts, as many readers can't read html or > the formatting gets screwy. This is a plain text mailing list in > general. Attachments are ok tho) >=20 > On Tue, May 18, 2010 at 5:14 PM, Tena Sakai wrote: >>=20 >> Hi Everybody, >>=20 >> I am a bit troubled by pg_dump and pg_restore.=A0 My platform is >> redhat linux, Del 64 bit hardware, running postgres 8.3.7. >> I have a database named canon and I want to move a schema full of >> tables from canon to a new database named musket.=A0 The schema I >> am interested in is called tsakai.=A0 Here's what I have done: >>=20 >> =A0 $ env | grep PG >> =A0 PGUSER=3Dpostgres >> =A0 PGDATABASE=3Dcanon >> =A0 PGHOST=3Dlocalhost >> =A0 PGDATA=3D/usr/local/pgsql/data >> =A0 $ >> =A0 $ pg_dump -n tsakai > canon_tsakai.sql >> =A0 $ >> =A0 $ echo $? >> =A0 0 >> =A0 $ >> =A0 $ pg_restore -l canon_tsakai.sql >> =A0 pg_restore: [archiver] input file does not appear to be a valid arch= ive >> =A0 $ >> =A0 $ pg_restore -d musket canon_tsakai.sql >> =A0 pg_restore: [archiver] input file does not appear to be a valid arch= ive >>=20 >> Can someone please tell me (1) if there is anything wrong with my invoca= tion >> of pd_dump?=A0 (I want to generate a file pd_restore can use to feed to >> musket database.)=A0 (2) Why pg_restore wouldn't give me listing?=A0 And= (3) >> why the second pg_restore command is upset? >=20 > pg_restore expects custom format from pg_dump. For plain sql files, use > psql: >=20 > psql mydb -f mysql.sql