var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: restore migrated database
I have been successful in exporting database 'accounts' to a text file with pg_dump command...
What I need to do is to import this database to a different postgres server. This server doesn't have any database called 'accounts' defined...
How do i create this database, its tables and import the data from the dumped text file ?
Any help will be highly appreciated. Thanks.
Did you just do a data dump? It should include all the table definitions, functions, triggers, etc. by default. However, it does not create the database for you; you need to create a new (blank) one yourself to restore the dump. Something like:
pg_dump does have an option (--create or -C) to create the database and connect to it before restoring the dump.
createdb -T template0 accounts
psql -f <dump file> accounts
Last edited by futurity; 11-03-09 at