Home > Archive > PostgreSQL Discussion > April 2006 > recovering from a --clean dump









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author recovering from a --clean dump
samfisch@googlemail.com

2006-04-06, 8:25 pm

hello,
I use an automated script that if it detects a problem in a database
uses a dumb from another db to recover data.

'pg_dump -c -h host1 d1 | psql -a -h host2 -d db2 >> recover_dump 2>&1'

now my recover_dump tells me a unix index could`nt be created as the
table contains duplicated keys.

My guess is the data there was data inserted by the application while
the restore was inserting data and the constraints where not set.
This seems possible to me as there is no LOCK statement in the dump.

So actually I m searching for a way to tell the target db not to take
any connections while restoring
but also wonder if I in future have to take more action to protect
databases I dump --clean dumps to.

debian sarge
psql (PostgreSQL) 7.4.7

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com