Re: Restore from pg_dumpall

From: Jeff Frost <jeff(at)frostconsultingllc(dot)com>
To: "Buorn, Yoway" <Yoway(dot)Buorn(at)gd-ais(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Restore from pg_dumpall
Date: 2005-08-08 18:01:57
Message-ID: Pine.LNX.4.63.0508081100210.14805@discord.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)frostconsultingllc(dot)com>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Dirk Kalp 2005-08-08 21:11:11 Trouble Getting Database Server Started
Previous Message Buorn, Yoway 2005-08-08 17:41:00 Re: Restore from pg_dumpall