troubled by pg_dump and pg_restore
am 19.05.2010 01:14:49 von Tena Sakai
--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
|
top" style=3D"font: inherit;">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
r> 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--
Re: troubled by pg_dump and pg_restore
am 19.05.2010 01:20:53 von Rosser Schwarz
--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 <
=3D"mailto:sakaitena@yahoo.com">sakaitena@yahoo.com> wrote:
r>
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
|
gn=3D"top" style=3D"font:inherit">
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?
<=
/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--
Re: troubled by pg_dump and pg_restore
am 19.05.2010 01:24:52 von Samuel Stearns
--_000_68B59BEDCD36854AADBDF17E91B2937A01A54D117EEXCHMAILsta ff_
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_68B59BEDCD36854AADBDF17E91B2937A01A54D117EEXCHMAILsta ff_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" xmlns=3D"http://ww=
w.w3.org/TR/REC-html40">
>
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags" name=3D"City"/=
>
name=3D"place"/>
name=3D"PersonName"/>
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Try this:
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>pg_dump –n tsakai canon | psql
musket
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Sam
=3D'font-size:
10.0pt;font-family:Arial;color:navy'>
e=3D3
face=3D"Times New Roman">
style=3D'font-size:10.0pt;font-family:Tahoma;font-weight:bol d'>From:=
size=3D2 face=3DTahoma>
mily:Tahoma'>
pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] =
style=3D'font-weight:bold'>On Behalf Of Tena Sakai
Sent: Wednesday, 19 May 2010=
8:45
AM
To:
on">pgsql-admin@postgresql.org
Subject: [ADMIN] troubled by
pg_dump and pg_restore=
p>
'font-size:
12.0pt'>
style=3D'font-size:12.0pt'>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
City>
|
'font-size:
12.0pt'>
--_000_68B59BEDCD36854AADBDF17E91B2937A01A54D117EEXCHMAILsta ff_--
Re: troubled by pg_dump and pg_restore
am 19.05.2010 01:26:24 von Scott Marlowe
(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
--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Re: troubled by pg_dump and pg_restore
am 19.05.2010 01:43:18 von Tena Sakai
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
--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin