pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Frost <jeff@frostconsultingllc.com>
To: Tena Sakai <tsakai@gallo.ucsf.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: restoring from dump
Date: Fri, 22 Aug 2008 22:22:19 -0700
Message-ID: <48AF9E8B.9020508@frostconsultingllc.com> (raw)
In-Reply-To: <FE44E0D7EAD2ED4BB2165071DB8E328C0378F414@egcrc-ex01.egcrc.org>
References: <FE44E0D7EAD2ED4BB2165071DB8E328C0378F40C@egcrc-ex01.egcrc.org>
	<Pine.LNX.4.64.0808221515340.14879@discord.home.frostconsultingllc.com>
	<FE44E0D7EAD2ED4BB2165071DB8E328C0378F40D@egcrc-ex01.egcrc.org>
	<Pine.LNX.4.64.0808221553290.14879@discord.home.frostconsultingllc.com>
	<FE44E0D7EAD2ED4BB2165071DB8E328C0378F40F@egcrc-ex01.egcrc.org>
	<FE44E0D7EAD2ED4BB2165071DB8E328C0378F413@egcrc-ex01.egcrc.org>
	<Pine.LNX.4.64.0808222125160.14696@glacier.frostconsultingllc.com>
	<FE44E0D7EAD2ED4BB2165071DB8E328C0378F414@egcrc-ex01.egcrc.org>

Tena Sakai wrote:
>
> > If you want to restore all the databases that were in this
> > postgresql installation at the time of the backup, then the
> > best thing to do is drop all those DBs before attempting the
> > restore.
> Yes, the database in question is built and updated continuously
> from a several sources.  There was a massive power failure,
> a series of them, and things got to be a very inconsistent
> state and therefore we need to go back to a reliable, trustworthy
> backup and then rebuild from there.
>
> What I gather, from your comments, all I have to do would to issue
> a psql command:
>   drop database <dbname>
> then repeat what I did from shell prompt, ie.,
>   zcat <compressed_file> | psql postgres > restore.out 2 > restore.err
>
> Would you mind confirming if I am understanding you correctly?
>
Yes, based on the information you've given us, you should be able to
restore the entire database (and any other databases that were in the
cluster) by first dropping those databases and then issuing the above
command.

BTW, if you find yourself with an older version of postgresql, this
could be a good opportunity to upgrade.  I'm not sure if you mentioned
what version you were using in your original post.



-- 
Jeff Frost, Owner 	<jeff@frostconsultingllc.com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 916-647-6411	FAX: 916-405-4032

view thread (21+ messages)  latest in thread

Message-ID: <48AF9E8B.9020508@frostconsultingllc.com>
Permalink:  ../48AF9E8B.9020508@frostconsultingllc.com/
Also on:    postgresql.org/message-id/48AF9E8B.9020508@frostconsultingllc.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: jeff@frostconsultingllc.com, tsakai@gallo.ucsf.edu
  Subject: Re: restoring from dump
  In-Reply-To: <48AF9E8B.9020508@frostconsultingllc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox