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

Re: restoring from dump

From: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
To: Tena Sakai <tsakai(at)gallo(dot)ucsf(dot)edu>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: restoring from dump
Date: 2008-08-23 05:22:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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

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(at)frostconsultingllc(dot)com>
Frost Consulting, LLC
Phone: 916-647-6411	FAX: 916-405-4032

In response to


pgsql-admin by date

Next:From: Jeff FrostDate: 2008-08-23 05:28:53
Subject: Re: restoring from dump
Previous:From: Tena SakaiDate: 2008-08-23 05:12:26
Subject: Re: restoring from dump

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