Re: Restore from pg_dumpall - Mailing list pgsql-admin

From Jeff Frost
Subject Re: Restore from pg_dumpall
Date
Msg-id Pine.LNX.4.63.0508081100210.14805@discord.dyndns.org
Whole thread Raw
In response to Re: Restore from pg_dumpall  ("Buorn, Yoway" <Yoway.Buorn@gd-ais.com>)
List pgsql-admin
On Mon, 8 Aug 2005, Buorn, Yoway wrote:

> Unfortunately, I don't have the dump and restore in my buffer, but I ran
> "pg_dumpall > backup.dump" and then I tried to upgrade Gforge and I got
> errors, so I freaked out and decided to restore before trying again.  I
> then ran "pg_restore -c backup.dump" and it told me the file wasn't an
> archive so it wouldn't restore.

There's your problem (or at least one of them).  The pg_dumpall outputs
straight SQL to stdout to recreate all DBs.  To restore this, you would just
do the following:

psql template1 < backup.dump

pg_restore is looking for one of the other output formats (tar or custom).

--
Jeff Frost, Owner     <jeff@frostconsultingllc.com>
Frost Consulting, LLC     http://www.frostconsultingllc.com/
Phone: 650-780-7908    FAX: 650-649-1954

pgsql-admin by date:

Previous
From: "Buorn, Yoway"
Date:
Subject: Re: Restore from pg_dumpall
Next
From: "Dirk Kalp"
Date:
Subject: Trouble Getting Database Server Started