Skip site navigation (1) Skip section navigation (2)

Replacing data

From: chelsea boot <scx6148(at)yahoo(dot)co(dot)uk>
To: pgsql-novice(at)postgresql(dot)org
Subject: Replacing data
Date: 2006-06-15 11:22:49
Message-ID: 20060615112250.68776.qmail@web86802.mail.ukl.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hi
   
  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?
   
  Thanks

 Send instant messages to your online friends http://uk.messenger.yahoo.com 

Responses

pgsql-novice by date

Next:From: Aarni RuuhimäkiDate: 2006-06-15 11:43:01
Subject: Re: Replacing data
Previous:From: David FetterDate: 2006-06-15 00:58:09
Subject: Re: Can PostgreSQL 8.x Return Multiple "Result Sets" ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group