From: Samuel Stearns <SStearns@internode.com.au>
To: Tena Sakai <sakaitena@yahoo.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: troubled by pg_dump and pg_restore
Date: Wed, 19 May 2010 08:54:52 +0930
Message-ID: <68B59BEDCD36854AADBDF17E91B2937A01A54D117E@EXCHMAIL.staff.internode.com.au> (raw)
In-Reply-To: <384163.64826.qm@web51901.mail.re2.yahoo.com>
References: <384163.64826.qm@web51901.mail.re2.yahoo.com>
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=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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: SStearns@internode.com.au, sakaitena@yahoo.com
Subject: Re: troubled by pg_dump and pg_restore
In-Reply-To: <68B59BEDCD36854AADBDF17E91B2937A01A54D117E@EXCHMAIL.staff.internode.com.au>
References: <384163.64826.qm@web51901.mail.re2.yahoo.com> <68B59BEDCD36854AADBDF17E91B2937A01A54D117E@EXCHMAIL.staff.internode.com.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox