Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pgAdmin III Restore PLAIN Backup

Tags:

postgresql

New to PostgreSQL database, I found column names were automatically converted to lowercase. I created a PLAIN backup, manually edited the column names to proper case. When I tried to restore the edited PLAIN backup, the OK button of pgAdmin3 Restore was disabled.

Is there a way run the edited plain backup file? Please help.

like image 770
Nick Binnet Avatar asked Feb 03 '11 17:02

Nick Binnet


People also ask

How do I restore a PostgreSQL backup?

To restore a PostgreSQL database, you can use the psql or pg_restore utilities. psql is used to restore text files created by pg_dump whereas pg_restore is used to restore a PostgreSQL database from an archive created by pg_dump in one of the non-plain-text formats (custom, tar, or directory).

How do I open a backup file in pgAdmin?

Select the name of the backup source in the pgAdmin tree control, right click to open the context menu, and select Backup… to open the Backup dialog. The name of the object selected will appear in the dialog title bar.


1 Answers

Use the client program psql to restore, works fine. The installers of pgAdmin and PostgreSQL also install psql, so you should have it on your pc or your database server.

psql -f backup.sql postgres
like image 60
Frank Heikens Avatar answered Sep 21 '22 19:09

Frank Heikens