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

pg_dump / pg_restore

From: Steve Tucknott <steve(at)retsol(dot)co(dot)uk>
To: PostGreSQL <pgsql-novice(at)postgresql(dot)org>
Subject: pg_dump / pg_restore
Date: 2004-09-28 14:25:18
Message-ID: 1096381521.1083.18.camel@retsol1 (view raw or flat)
Thread:
Lists: pgsql-novice
PostGreSQL 7.4.5

Not sure if this is the correct list ....
We were moving a database between two laptops and used pg_dump /
pg_restore to copy a specific database. 
The problem was that pg_restore kept stopping as files already existed
in the target database (even though we had dropped the target and
recreated it)  We followed and exact example from the pg_restore man
page. 
As it turned out out the problem appeared to be caused by createdb not
using template0 to create the blank database - and hence creating one
partially populated. We dropped and recreated the target using -T
template0 and the restore worked fine.

The reason for the mail - would it be possible to highlight this in the
pg_restore documentation or to add a further option to pg_restore to
'overwrite' existing files?
Apologies in advance if the documentation already tells you to do
this...!


Regards,

Steve Tucknott

ReTSol Ltd

DDI: 01903 828769

pgsql-novice by date

Next:From: Taber, MarkDate: 2004-09-28 15:18:37
Subject: pg 8.0b2, psql problem
Previous:From: Tom LaneDate: 2004-09-28 14:04:26
Subject: Re: Cannot start PostgreSQL

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