Restoring from a backup of file.

Hi All ,

I am having a postgres backupfile with name x.sqlc. I want to restore it . It is using an user with name “Postgres” . I have created the user postgres . I have added the user in the database. But still during the restore i am getting the following exception.Please help

C:\Program Files\pgAdmin III\1.12\pg_restore.exe --host localhost --port 5432 --username “DBA” --dbname rfs --verbose “C:\Users\ashutosl\Desktop\RFS Info\rfs11.07.2011_23.00.sqlc”
pg_restore: connecting to database for restore
pg_restore: creating SCHEMA public
pg_restore: creating COMMENT SCHEMA public
pg_restore: creating PROCEDURAL LANGUAGE plpgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 404; 2612 11574 PROCEDURAL LANGUAGE plpgsql postgres
pg_restore: [archiver (db)] could not execute query: ERROR: syntax error at or near “PROCEDURAL”
LINE 2: CREATE OR REPLACE PROCEDURAL LANGUAGE plpgsql;

Thanks in advance . Waitng for your feedback.

Ashutos,

With which version of pg_dump was the backup created and with which versions of pg_restore or the pg db do you want to restore?

Rob

Hi Rob,

Thanks for your reply . May be the backup is created with pg 5.2.8 . And I am doing the restore with pg 5.2.9. I am using PG Admin 1.12.1.Can the back up file be.sqlc file.
But I guess we require .backup file ?.

Please do help.
Thanks,
Ashutos.

Ashutos,

I guess you mean Servoy 5.2.*, not postgres?

The 5.2.* postgres are bundled with the same version, but it seems you are using the pg_restore from pgadmin3, not the one bundled with Servoy.
Try the one in /path/to/servoy/application_server/postgres_db/bin/pg_restore.exe

Rob