pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marvin <magosoft@gmx.net>
To: DOlbersen@stbernard.com
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_restore problem!!!
Date: Tue, 22 Jul 2003 15:08:31 -0600
Message-ID: <3F1DA7CF.000001.02764@guaj215desa> (raw)
References: <E7E213858379814A9AE48CA6754F5ECB0D7005@mail01.stbernard.com>

Thank you.
You saved my day!!!
That command restores all my data into my DB.

MAGO
 
-------Mensaje original-------
 
De: David Olbersen
Fecha: Martes, 22 de Julio de 2003 03:02:48 p.m.
A: pgsql-admin@postgresql.org
Asunto: Re: [ADMIN] pg_restore problem!!!
 
Nick,

> To restore from a plain-text dump file, just pipe it into 
> psql like so:
> 
> cat [filename] | psql [dbname]

To nit-pick, this is a "useless use of cat".

In UNIX-land, simple input redirection will work much better:

psql [dbname and various options] < [filename]

It's also less to type! :)

I also believe this works in certain Windows operating systems, which is
what it appears Mago is using.

--------------------------
David Olbersen 
iGuard Engineer
St. Bernard Software
11415 West Bernardo Court 
San Diego, CA 92127 
1-858-676-2277 x2152


> -----Original Message-----
> From: Nick Fankhauser [mailto:nickf@ontko.com]
> Sent: Tuesday, July 22, 2003 1:30 PM
> To: Marvin; pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] pg_restore problem!!!
> 
> 
> Mago-
> 
> pg_restore is used to restore a dump file created in one of 
> the non-text
> formats such as tar format.
> 
> To restore from a plain-text dump file, just pipe it into 
> psql like so:
> 
> cat [filename] | psql [dbname]
> 
> -Nick
> 
> ---------------------------------------------------------------------
> Nick Fankhauser
> 
> nickf@doxpop.com Phone 1.765.965.7363 Fax 1.765.962.9788
> doxpop - Court records at your fingertips - http://www.doxpop.com/
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Marvin
> Sent: Tuesday, July 22, 2003 3:22 PM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] pg_restore problem!!!
> 
> 
> I made a back up file with this sentence:
> 
> pg_dump -U [superusername] -C -D -f [filename] [dbname]
> 
> It seems to work fine. I opened the file and I saw all the commands to
> insert every piece of data and reconstruct my schema. However 
> when I try to
> restore that file it gets me the following error:
> 
> C:\>pg_restore [filename]
> pg_restore: [archiver] input file does not appear to be a 
> valid archive
> 
> What I am doing wrong??
> Any ideas??
> 
> Thank you in advanced.
> 
> 
> MAGO
> 
> 
> _________________________________________________________________
> IncrediMail - El E-mail ha evolucionado finalmente - Haga clic aquĆ­
> 
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 8: explain analyze is your friend
> 

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

.

Attachments:

IMSTP.gif (image/gif, 494B) download view image

view thread (17+ messages)  latest in thread

Message-ID: <3F1DA7CF.000001.02764@guaj215desa>
Permalink:  ../3F1DA7CF.000001.02764@guaj215desa/
Also on:    postgresql.org/message-id/3F1DA7CF.000001.02764@guaj215desa

 · 

reply

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: magosoft@gmx.net, DOlbersen@stbernard.com
  Subject: Re: pg_restore problem!!!
  In-Reply-To: <3F1DA7CF.000001.02764@guaj215desa>

* 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