pdql, pg_dump, and pg_restore

Поиск
Список
Период
Сортировка
От nzanella@cs.mun.ca (Neil Zanella)
Тема pdql, pg_dump, and pg_restore
Дата
Msg-id b68d2f19.0407311157.6898902e@posting.google.com
обсуждение исходный текст
Ответы Re: pdql, pg_dump, and pg_restore  ("Uwe C. Schroeder" <uwe@oss4u.com>)
Список pgsql-general
Hello,

I have an SQL database which I create with:

psql -f create.sql foodb

I then access this database and perform several insertions, modifications,
and deletions. Finally, I want to backup my database. I do not want to
backup the schema. All I want is a set of insert statements stored in
a file insert.sql which I can run on a set of empty database tables
with the command:

psql -f insert.sql foodb

in order to restore the contents of the database to what it was previously.

I have tried the utilities pg_dump and pg_restore and
read the manual pages, but after running pg_dump I get a file with the whole
schema, not exactly what I wanted. And when I restore it my application
does not find what it needs any more.

So my question is, how do I properly do the type of dump and restore that
I have described above. I don't care which file format, as long as I can
just repopulate empty tables. I am not sure what I am doing wrong, but
the problem I am having is that upon restoring the dump my application
does not find the appropriate fields in the appropriate tables. ???

All that should be needed is one command to dump, and one to restore, right?

Thanks,

Neil

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

Предыдущее
От: "Jim Wilson"
Дата:
Сообщение: Commit Transaction Command
Следующее
От: Joe Lester
Дата:
Сообщение: shared_buffers Question