Re: troubled by pg_dump and pg_restore

From: Samuel Stearns <SStearns(at)internode(dot)com(dot)au>
To: Tena Sakai <sakaitena(at)yahoo(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: troubled by pg_dump and pg_restore
Date: 2010-05-18 23:24:52
Message-ID: 68B59BEDCD36854AADBDF17E91B2937A01A54D117E@EXCHMAIL.staff.internode.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Try this:

pg_dump -n tsakai canon | psql musket

Sam

________________________________
From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Tena Sakai
Sent: Wednesday, 19 May 2010 8:45 AM
To: pgsql-admin(at)postgresql(dot)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=postgres
PGDATABASE=canon
PGHOST=localhost
PGDATA=/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 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?

Thank you.

Regards,

Tena sakai

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Marlowe 2010-05-18 23:26:24 Re: troubled by pg_dump and pg_restore
Previous Message Rosser Schwarz 2010-05-18 23:20:53 Re: troubled by pg_dump and pg_restore