Re: Restaring a dumped database

Поиск
Список
Период
Сортировка
От Frank Bax
Тема Re: Restaring a dumped database
Дата
Msg-id 4CD7EAD4.5060306@sympatico.ca
обсуждение исходный текст
Ответ на Restaring a dumped database  ("Mohlomi Moloi" <mmoloi@khulisa.com>)
Список pgsql-novice
Mohlomi Moloi wrote:
> Hi Everyone,
>
> I’ve used the following script for my dump; pg_dump -h 127.0.0.1 -p 5432
> -U mohlomi -F p teleform  > "teleform_Backup.dump" – and it worked fine.
>
> After my dump, I dropped the database teleform - My nightmare starts
> when I try to restore and I get error massages that the database dropped
> already exist etc...
>
> I used the script psql -h 127.0.0.1 -p 5432 -U mohlomi -d teleform <
> "teleform_Backup.dump" for restoring the database.
>
> Funny enough the above scripts works at a table level!!!
>
> Any assistance will be welcomed.



If you are trying to restore over an existing database; then you should
either:
1) use -c option on pg_dump.
2) manually drop all tables, indexes and database.

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Mohlomi Moloi"
Дата:
Сообщение: Restaring a dumped database
Следующее
От: "Rob Richardson"
Дата:
Сообщение: In PgAdmin, how can I see all of a long text field?