pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
old database dump.
5+ messages / 4 participants
[nested] [flat]

* old database dump.
@ 2005-12-01 04:09  Theo Galanakis <t.galanakis@mbs.edu>
  0 siblings, 1 reply; 5+ messages in thread

From: Theo Galanakis @ 2005-12-01 04:09 UTC (permalink / raw)
  To: pgsql-admin

Hi,
	I have an old postgres database backed up using the psql >
database.bak command, as apposed to pg_dump. The database was on a linux
machine.

	I'm now trying to restore this db on a windows machine using
pg8.0. However pg_restore cannot recognize the file and psql <
database.bak prompts me for a password. How can I run the psql command
without being prompted for a password. The password prompt and < command
do not mix well as you are prompted for a password and then the command
piped the file to the password prompt. If you know what I mean :(

Is there another means of restoring this database.

Theo
	


--
_______________________________________________________________________________

 

Notice from Melbourne Business School Ltd 


The information contained in this e-mail is confidential, and is intended for
the named person's use only.  It may contain proprietary or legally privileged
information. If you have received this email in error, please notify the
sender and delete it immediately.  You must not, directly or indirectly, use,
disclose, distribute, print, or copy any part of this message if you are not
the intended recipient

Internet communications are not secure. You should scan this message and any
attachments for viruses. Melbourne Business School does not accept any
liability for loss or damage which may result from receipt of this message or
any attachments.

______________________________________________________________________________ 



 




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: old database dump.
@ 2005-12-01 06:57  Jeff Frost <jeff@frostconsultingllc.com>
  parent: Theo Galanakis <t.galanakis@mbs.edu>
  0 siblings, 1 reply; 5+ messages in thread

From: Jeff Frost @ 2005-12-01 06:57 UTC (permalink / raw)
  To: Theo Galanakis <t.galanakis@mbs.edu>; +Cc: pgsql-admin

Use the .pgpass file.

On Thu, 1 Dec 2005, Theo Galanakis wrote:

> database.bak prompts me for a password. How can I run the psql command
> without being prompted for a password. The password prompt and < command

-- 
Jeff Frost, Owner 	<jeff@frostconsultingllc.com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: old database dump.
@ 2005-12-01 10:17  Paul Breen <paul.breen6@btinternet.com>
  parent: Jeff Frost <jeff@frostconsultingllc.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Paul Breen @ 2005-12-01 10:17 UTC (permalink / raw)
  To: pgsql-admin

Alternatively you can login with your password as
normal and then once in psql use the '\i filename'
command to read in your backup.

E.g.,
psql dbname
Password:
dbname=# \i database.bak
dbname=# \q

Regards - Paul Breen

--- Jeff Frost <jeff@frostconsultingllc.com> wrote:

> Use the .pgpass file.
> 
> On Thu, 1 Dec 2005, Theo Galanakis wrote:
> 
> > database.bak prompts me for a password. How can I
> run the psql command
> > without being prompted for a password. The
> password prompt and < command
> 
> -- 
> Jeff Frost, Owner 	<jeff@frostconsultingllc.com>
> Frost Consulting, LLC 
> http://www.frostconsultingllc.com/
> Phone: 650-780-7908	FAX: 650-649-1954
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
> 




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: old database dump.
@ 2005-12-01 15:40  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Paul Breen <paul.breen6@btinternet.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2005-12-01 15:40 UTC (permalink / raw)
  To: pgsql-admin

Paul Breen <paul.breen6@btinternet.com> writes:
> Alternatively you can login with your password as
> normal and then once in psql use the '\i filename'
> command to read in your backup.

Or use "psql -f file" instead of "psql < file".

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: old database dump.
@ 2005-12-01 22:19  Theo Galanakis <t.galanakis@mbs.edu>
  0 siblings, 0 replies; 5+ messages in thread

From: Theo Galanakis @ 2005-12-01 22:19 UTC (permalink / raw)
  To: pgsql-admin

Thanks Tom and Paul for your advice. 

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Tom Lane
Sent: Friday, 2 December 2005 2:40 AM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] old database dump.

Paul Breen <paul.breen6@btinternet.com> writes:
> Alternatively you can login with your password as
> normal and then once in psql use the '\i filename'
> command to read in your backup.

Or use "psql -f file" instead of "psql < file".

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend



--
_______________________________________________________________________________

 

Notice from Melbourne Business School Ltd 


The information contained in this e-mail is confidential, and is intended for
the named person's use only.  It may contain proprietary or legally privileged
information. If you have received this email in error, please notify the
sender and delete it immediately.  You must not, directly or indirectly, use,
disclose, distribute, print, or copy any part of this message if you are not
the intended recipient

Internet communications are not secure. You should scan this message and any
attachments for viruses. Melbourne Business School does not accept any
liability for loss or damage which may result from receipt of this message or
any attachments.

______________________________________________________________________________ 



 




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2005-12-01 22:19 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-01 04:09 old database dump. Theo Galanakis <t.galanakis@mbs.edu>
2005-12-01 06:57 ` Jeff Frost <jeff@frostconsultingllc.com>
2005-12-01 10:17   ` Paul Breen <paul.breen6@btinternet.com>
2005-12-01 15:40     ` Tom Lane <tgl@sss.pgh.pa.us>
2005-12-01 22:19 Re: old database dump. Theo Galanakis <t.galanakis@mbs.edu>

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