Обсуждение: Problem performing a restore of a data schema in Windows
Hi All
Im having a problem restoring a data schema on Postgres 8.01 for Windows.
Im using the following command
psql -U username -d db1 > filename.dmp
This should have restored the schema from the file, filename.dmp to the database, db1
I did create the database before restoring the data schema. And its not working.
Am I missing something?
Thanks in advance.
Kind Regards,
Shaun Clements
Subject to www.relyant.co.za/edisclaim.htm
On Monday 07 Feb 2005 6:52 pm, Shaun Clements wrote: > Im having a problem restoring a data schema on Postgres 8.01 for Windows. > Im using the following command > psql -U username -d db1 > filename.dmp Shouldn't that be psql -U username -d db1 < filename.dmp Shridhar
Hi,
Can u please try with the following command:
pg_dump -s dbname >DumpFileName.dmp
or
pg_dump -s -u dbname >DumpFileName.dmp
For the second, you will be asked for username & password.
Regards,
Sandeep
Shaun Clements wrote:
> Hi All
>
> Im having a problem restoring a data schema on Postgres 8.01 for Windows.
> Im using the following command
> psql -U username -d db1 > filename.dmp
>
> This should have restored the schema from the file, filename.dmp to
> the database, db1
> I did create the database before restoring the data schema. And its
> not working.
>
> Am I missing something?
> Thanks in advance.
>
> Kind Regards,
> Shaun Clements
> Subject to www.relyant.co.za/edisclaim.htm
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------
>
>email-body was scanned and no virus found
>---------------------------------------------------------
>
>
---------------------------------------------------------
Disclaimer:
The contents of this message are confidential and intended to the addressee at the specified e-mail address only. Its
contentsmay not be copied or disclosed to anyone other than the intended recipient. If this e-mail is received in
error,please contact Vertex Software Pvt. Ltd immediately on +91 20 4041500 with details of the sender and addressee
anddelete the e-mail. Vertex Software Pvt. Ltd accepts no responsibility in the event that the onward transmission,
openingor use of this message and/or any attachments adversely affects the recipient's systems or data. It is the
recipient'sresponsibility to carry out such virus and other checks as the recipient considers appropriate.
---------------------------------------------------------
On Feb 7, 2005, at 8:22 AM, Shaun Clements wrote: > psql -U username -d db1 > filename.dmp Try psql.exe -U username -d db1 -f filename.dmp If it does not work, paste the output from the terminal so we can see what error you have. Are you sure filename.dmp is a plain text dump? If not, you need to use pg_restore instead of psql. John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL