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