From: Tena Sakai <tsakai@gallo.ucsf.edu>
To: Scott Marlowe <scott.marlowe@gmail.com>
To: Tena Sakai <SakaiTena@yahoo.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: troubled by pg_dump and pg_restore
Date: Tue, 18 May 2010 16:43:18 -0700
Message-ID: <C8187426.B130%tsakai@gallo.ucsf.edu> (raw)
In-Reply-To: <AANLkTilWDQjU2W6SORAZj_xQOod9UMPSeeQcInDiwTQc@mail.gmail.com>
Many thanks, Rosser, Sam, and Scott.
Regards,
Tena Sakai
tsakai@gallo.ucsf.edu
On 5/18/10 4:26 PM, "Scott Marlowe" <scott.marlowe@gmail.com> 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)
>
> On Tue, May 18, 2010 at 5:14 PM, Tena Sakai <sakaitena@yahoo.com> wrote:
>>
>> 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?
>
> pg_restore expects custom format from pg_dump. For plain sql files, use
> psql:
>
> psql mydb -f mysql.sql
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tsakai@gallo.ucsf.edu, scott.marlowe@gmail.com, SakaiTena@yahoo.com
Subject: Re: troubled by pg_dump and pg_restore
In-Reply-To: <C8187426.B130%tsakai@gallo.ucsf.edu>
* 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