Search Postgresql Archives

Re: Problem with pg_restore into new database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mr. John wrote:
> but on the server is no database called _struct_fis_
> err_resto.txt file contents only "0".
> 
> If I add     -d
> @echo off
>  "pg_restore.exe"  -h 192.168.1.1 -p 5432 -U postgres -d "_struct_fis_" -C -v "stru.tar"   2>>log_resto.txt 
>  echo %errorlevel% >err_resto.txt
> 
> error is "1" and log file  :
> 
>    pg_restore: connecting to database for restore
> pg_restore: [archiver (db)] connection to database "_struct_fis_" failed: FATAL:  database "_struct_fis_" does not exist
> pg_restore: *** aborted because of error

I'm not sure I understand your problem fully, but this is because you
are trying to connect (-d ...) to database _struct_fis_ before it's
created. Connect to a database you know exists (template1 or postgres
for example) and then let the restore create the database.


-- 
  Richard Huxton
  Archonet Ltd

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux