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:
Show quoted text
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.dmpThis 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
---------------------------------------------------------
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