On Thursday 15 June 2006 14:22, chelsea boot wrote:
> I want to replace all the data in a database with an earlier backup I
> took. I have a plain sql-script dump (backup.sql) and am using the
> following command to replace the current data:
> psql -U postgres dbname < backup.sql
> However, the command seems to append the data to the database so that I
> have the old data and any new data added since the backup was taken. How
> can I replace all the data so that my database only contains data from the
> backup? Maybe I'm using the wrong backup and restore method?
> Send instant messages to your online friends http://uk.messenger.yahoo.com
creates a dump file which when run will first remove everything and then
create everything and then load the data.
See pg_dump --help for more options.
This is a bugfree broadcast to you
on **Fedora Core** linux system
In response to
pgsql-novice by date
|Next:||From: Frank Bax||Date: 2006-06-15 12:03:07|
|Subject: Re: Replacing data|
|Previous:||From: chelsea boot||Date: 2006-06-15 11:22:49|
|Subject: Replacing data|