pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedRestoring a Dump with psql on Windows Fails -Password Cannot Be Entered (?)
4+ messages / 3 participants
[nested] [flat]
* Restoring a Dump with psql on Windows Fails -Password Cannot Be Entered (?)
@ 2005-03-09 16:51 Schon, Gregor <Gregor.Schon@ids-scheer.com>
0 siblings, 0 replies; 4+ messages in thread
From: Schon, Gregor @ 2005-03-09 16:51 UTC (permalink / raw)
To: pgsql-admin
Hello
I try to restore a dump of a PostgreSQL 7.4 db into PostgrSQL 8.0.1 on
Windows XP SP1
When using pgadmin III it asks for a *.backup file which I do not have
and the OK button is greyed out when selecting the dump file - thus this
does not work.
When using psql as I do it on Linux (Suse 9.0) successfully I cannot
enter the password.
In a command prompt of Windows I get the following effect:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
C:\Programme\PostgreSQL\8.0\bin>psql phprvitadb <
C:\Programme\PostgreSQL\8.0\bin\phprvitadb200503082100.dump -U gsc
Passwort:
psql: FATAL: password authentication failed for user "gsc"
C:\Programme\PostgreSQL\8.0\bin>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~
It looks that I did not enter the correct password but actually the
system did not allow me to enter a password. The 2 lines:
Passwort:
psql: FATAL: password authentication failed for user "gsc"
are written in one step.
Is that a bug? I heard that Windows and Unix have different "New Line"
handling (LF / CR) - that could be related to the effect.
I could provide the password in the command line directly but there is
no '-pw' parameter or something similar for psql.
Any ideas what I could do to get the dump into the database? A little
help would be highly appreciated.
Thanks in advance
Gregor
Remark 1: The original Linux based 7.4 database is still running and
available - Maybe I have to work with some kind of binary backup
instead.
Remark 2: The postgreSQL database runs absolutly stable ( as a php
backend) on Linux for more than 2 years - it is wonderful software.
<mailto:pgsql-admin@postgresql.org>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Restoring a Dump with psql on Windows Fails - Password Cannot Be Entered (?)
@ 2005-03-11 15:17 Gregor Schon <g.schon@web.de>
2005-03-11 15:41 ` Re: Restoring a Dump with psql on Windows Fails - Password Cannot Be Entered (?) John DeSoi <desoi@pgedit.com>
0 siblings, 1 reply; 4+ messages in thread
From: Gregor Schon @ 2005-03-11 15:17 UTC (permalink / raw)
To: pgsql-admin
Hello
I' am new in the forum amd I send the question below to the forum because I thought that I could get a statement whether I do a mistake or whether it is a bug. And because I hoped to get a pointer what I can do to solve the problem ;-)
I try to restore a dump of a PostgreSQL 7.4 db into PostgrSQL 8.0.1 on Windows XP SP1
1) When using pgadmin III it asks for a *.backup file which I do not have and the OK button is greyed out when selecting the dump file - thus this option does not work.
2) When using psql as I do it on Linux (Suse 9.0) successfully I cannot enter the password.
In a command prompt of Windows I get the following effect:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Programme\PostgreSQL\8.0\bin>psql phprvitadb < C:\Programme\PostgreSQL\8.0\bin\phprvitadb200503082100.dump -U gsc
Passwort:
psql: FATAL: password authentication failed for user "gsc"
C:\Programme\PostgreSQL\8.0\bin>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It looks that I did not enter the correct password but actually the system did not allow me to enter a password. The 2 lines:
Passwort:
psql: FATAL: password authentication failed for user "gsc"
are written in one step.
Is that a bug? I heard that Windows and Unix have different "New Line" handling (LF / CR) - that could be related to the effect. There is a bug BUG #1461 with pg_restore but this seems to be different.
I could provide the password in the command line directly but there is no '-pw' parameter or something similar for psql.
I tried the recommendation "Notes to Windows Users" >cmd.exe /c chcp 1252 but this did not change the effect.
Any ideas what I could do to get the dump into the database? A little help would be highly appreciated.
Thanks in advance
Gregor
Remark 1: The original Linux based 7.4 database is still running and available - Maybe I have to work with some kind of binary backup instead.
Remark 2: The postgreSQL database runs absolutly stable ( as a php backend) on Linux for more than 2 years - it is a wonderful piece of software.
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Restoring a Dump with psql on Windows Fails - Password Cannot Be Entered (?)
2005-03-11 15:17 Restoring a Dump with psql on Windows Fails - Password Cannot Be Entered (?) Gregor Schon <g.schon@web.de>
@ 2005-03-11 15:41 ` John DeSoi <desoi@pgedit.com>
0 siblings, 0 replies; 4+ messages in thread
From: John DeSoi @ 2005-03-11 15:41 UTC (permalink / raw)
To: Gregor Schon <g.schon@web.de>; +Cc: pgsql-admin
On Mar 11, 2005, at 10:17 AM, Gregor Schon wrote:
> C:\Programme\PostgreSQL\8.0\bin>psql phprvitadb <
> C:\Programme\PostgreSQL\8.0\bin\phprvitadb200503082100.dump -U gsc
I think '<' is a problem on Windows. Try
C:\Programme\PostgreSQL\8.0\bin>psql -f
C:\Programme\PostgreSQL\8.0\bin\phprvitadb200503082100.dump -U gsc
phprvitadb
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Restoring a Dump with psql on Windows Fails - Password Cannot Be Entered (?) - solved!
@ 2005-03-11 17:12 Gregor Schon <g.schon@web.de>
0 siblings, 0 replies; 4+ messages in thread
From: Gregor Schon @ 2005-03-11 17:12 UTC (permalink / raw)
To: JohnDeSoi <desoi@pgedit.com>
Hello John
Thank you very much - that released the lock and the dump could be
restored. That helped me a lot!
Best regards and a nice weekend
Gregor
John DeSoi <desoi@pgedit.com> schrieb am 11.03.05 16:47:07:
>
>
> On Mar 11, 2005, at 10:17 AM, Gregor Schon wrote:
>
>> C:\Programme\PostgreSQL\8.0\bin>psql phprvitadb <
>> C:\Programme\PostgreSQL\8.0\bin\phprvitadb200503082100.dump -U gsc
>
>
> I think '<' is a problem on Windows. Try
>
> C:\Programme\PostgreSQL\8.0\bin>psql -f
> C:\Programme\PostgreSQL\8.0\bin\phprvitadb200503082100.dump -U gsc
> phprvitadb
>
>
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-03-11 17:12 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-09 16:51 Restoring a Dump with psql on Windows Fails -Password Cannot Be Entered (?) Schon, Gregor <Gregor.Schon@ids-scheer.com>
2005-03-11 15:17 Restoring a Dump with psql on Windows Fails - Password Cannot Be Entered (?) Gregor Schon <g.schon@web.de>
2005-03-11 15:41 ` Re: Restoring a Dump with psql on Windows Fails - Password Cannot Be Entered (?) John DeSoi <desoi@pgedit.com>
2005-03-11 17:12 Re: Restoring a Dump with psql on Windows Fails - Password Cannot Be Entered (?) - solved! Gregor Schon <g.schon@web.de>
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