pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Restore from pg_dumpall
9+ messages / 5 participants
[nested] [flat]

* Restore from pg_dumpall
@ 2005-08-05 23:59 Buorn, Yoway <Yoway.Buorn@gd-ais.com>
  2005-08-06 02:07 ` Re: Restore from pg_dumpall Jeff Frost <jeff@frostconsultingllc.com>
  2005-08-06 04:23 ` Re: Restore from pg_dumpall Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 9+ messages in thread

From: Buorn, Yoway @ 2005-08-05 23:59 UTC (permalink / raw)
  To: pgsql-admin

I'm upgrading Gforge and the first sql file I tried to load gave me the following error:

--
--        Function to enforce consistency in task start/end dates
--
DROP FUNCTION projtask_insert_depend () CASCADE ;
ERROR:  parser: parse error at or near "CASCADE"
...

Can anyone point out to me what is wrong with this sql?  Thanks.


Yoway Buorn
Software Engineer
Imagery Systems Engineering

GENERAL DYNAMICS
Advanced Information Systems

"Cockfighting has always been my idea of a great sport- two armed entrées battling to see who'll be dinner." -- P.J. O'Rourke

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Restore from pg_dumpall
  2005-08-05 23:59 Restore from pg_dumpall Buorn, Yoway <Yoway.Buorn@gd-ais.com>
@ 2005-08-06 02:07 ` Jeff Frost <jeff@frostconsultingllc.com>
  1 sibling, 0 replies; 9+ messages in thread

From: Jeff Frost @ 2005-08-06 02:07 UTC (permalink / raw)
  To: Buorn, Yoway <Yoway.Buorn@gd-ais.com>; +Cc: pgsql-admin

Yoway,

What are you upgrading from/to?  Can you share your dump and restore command 
line as well?

On Fri, 5 Aug 2005, Buorn, Yoway wrote:

> I'm upgrading Gforge and the first sql file I tried to load gave me the following error:

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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Restore from pg_dumpall
  2005-08-05 23:59 Restore from pg_dumpall Buorn, Yoway <Yoway.Buorn@gd-ais.com>
@ 2005-08-06 04:23 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 9+ messages in thread

From: Tom Lane @ 2005-08-06 04:23 UTC (permalink / raw)
  To: Buorn, Yoway <Yoway.Buorn@gd-ais.com>; +Cc: pgsql-admin

"Buorn, Yoway" <Yoway.Buorn@gd-ais.com> writes:
> I'm upgrading Gforge and the first sql file I tried to load gave me the =
> following error:

> DROP FUNCTION projtask_insert_depend () CASCADE ;
> ERROR:  parser: parse error at or near "CASCADE"

> Can anyone point out to me what is wrong with this sql?  Thanks.

Nothing ... in any PG version newer than 7.3 or so.  Are you trying
to back-port a dump into an older server version, and if so why?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Restore from pg_dumpall
@ 2005-08-08 17:41 Buorn, Yoway <Yoway.Buorn@gd-ais.com>
  2005-08-08 18:01 ` Re: Restore from pg_dumpall Jeff Frost <jeff@frostconsultingllc.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Buorn, Yoway @ 2005-08-08 17:41 UTC (permalink / raw)
  To: pgsql-admin

>From: Jeff Frost [mailto:jeff@frostconsultingllc.com] 
>What are you upgrading from/to?  Can you share your dump and restore
command line as well?

I am upgrading from Gforge 3.0b1 to Gforge 4.5.0.1.

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.

>From: Tom Lane
>Nothing ... in any PG version newer than 7.3 or so.  Are you trying to
back-port a dump into an older
>server version, and if so why?

I don't think I'm back-porting a dump.  I don't even know what that
means exactly.  All I want to do is upgrade to Gforge 4.5.0.1.  However,
I *feel* I jacked up the DB in the process, so now I just want to
restore from my dump and then try upgrading again.  Thanks for all your
help guys.



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Restore from pg_dumpall
  2005-08-08 17:41 Re: Restore from pg_dumpall Buorn, Yoway <Yoway.Buorn@gd-ais.com>
@ 2005-08-08 18:01 ` Jeff Frost <jeff@frostconsultingllc.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Jeff Frost @ 2005-08-08 18:01 UTC (permalink / raw)
  To: Buorn, Yoway <Yoway.Buorn@gd-ais.com>; +Cc: 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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Restore from pg_dumpall
@ 2005-08-16 15:55 Buorn, Yoway <Yoway.Buorn@gd-ais.com>
  2005-08-16 16:29 ` Re: Restore from pg_dumpall Alvaro Herrera <alvherre@alvh.no-ip.org>
  2005-08-16 22:42 ` Re: Restore from pg_dumpall Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 9+ messages in thread

From: Buorn, Yoway @ 2005-08-16 15:55 UTC (permalink / raw)
  To: pgsql-admin

No, I'm not trying to back-port a dump.  I simply followed the
instructions in the section 2.3.4 of the gforge manual which tells me to
go into the db/ folder and apply the schema changes in order for all sql
files dated after the existing installation.  So I started with
20050312.sql and it gave me this parse error near "CASCADE".

You mention there's nothing wrong with this.  Does this mean the message
is not really an error and I can safely ignore it?

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us] 
Sent: Friday, August 05, 2005 9:24 PM
To: Buorn, Yoway
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Restore from pg_dumpall 

"Buorn, Yoway" <Yoway.Buorn@gd-ais.com> writes:
> I'm upgrading Gforge and the first sql file I tried to load gave me 
> the = following error:

> DROP FUNCTION projtask_insert_depend () CASCADE ;
> ERROR:  parser: parse error at or near "CASCADE"

> Can anyone point out to me what is wrong with this sql?  Thanks.

Nothing ... in any PG version newer than 7.3 or so.  Are you trying to
back-port a dump into an older server version, and if so why?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Restore from pg_dumpall
  2005-08-16 15:55 Re: Restore from pg_dumpall Buorn, Yoway <Yoway.Buorn@gd-ais.com>
@ 2005-08-16 16:29 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
  1 sibling, 0 replies; 9+ messages in thread

From: Alvaro Herrera @ 2005-08-16 16:29 UTC (permalink / raw)
  To: Buorn, Yoway <Yoway.Buorn@gd-ais.com>; +Cc: pgsql-admin

On Tue, Aug 16, 2005 at 08:55:30AM -0700, Buorn, Yoway wrote:
> No, I'm not trying to back-port a dump.  I simply followed the
> instructions in the section 2.3.4 of the gforge manual which tells me to
> go into the db/ folder and apply the schema changes in order for all sql
> files dated after the existing installation.  So I started with
> 20050312.sql and it gave me this parse error near "CASCADE".
> 
> You mention there's nothing wrong with this.  Does this mean the message
> is not really an error and I can safely ignore it?

Not at all.  What server version are you using?  You can find out by
issuing

SELECT version();

-- 
Alvaro Herrera (<alvherre[a]alvh.no-ip.org>)
One man's impedance mismatch is another man's layer of abstraction.
(Lincoln Yeoh)



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Restore from pg_dumpall
  2005-08-16 15:55 Re: Restore from pg_dumpall Buorn, Yoway <Yoway.Buorn@gd-ais.com>
@ 2005-08-16 22:42 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 9+ messages in thread

From: Tom Lane @ 2005-08-16 22:42 UTC (permalink / raw)
  To: Buorn, Yoway <Yoway.Buorn@gd-ais.com>; +Cc: pgsql-admin

"Buorn, Yoway" <Yoway.Buorn@gd-ais.com> writes:
> No, I'm not trying to back-port a dump.  I simply followed the
> instructions in the section 2.3.4 of the gforge manual which tells me to
> go into the db/ folder and apply the schema changes in order for all sql
> files dated after the existing installation.  So I started with
> 20050312.sql and it gave me this parse error near "CASCADE".

> You mention there's nothing wrong with this.  Does this mean the message
> is not really an error and I can safely ignore it?

What that probably means is that you need a newer version of Postgres
before trying to install gforge.  It would seem that you have PG 7.2 or
before.  I don't know what gforge's minimum requirement for PG version
is, but certainly 7.2 is pretty ancient.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* restore from pg_dumpall
@ 2008-03-13 18:41 Marc Fromm <Marc.Fromm@wwu.edu>
  0 siblings, 0 replies; 9+ messages in thread

From: Marc Fromm @ 2008-03-13 18:41 UTC (permalink / raw)
  To: pgsql-admin

When restoring from a pg_dumpall file, is it best to delete the contents
of the data folder, run intitdb to recreate it, and then do the command
"psql -U postgres -f backupfile postgres"?

When I do the restore over top of what is in the data folder already,
there are many errors reported.

Thanks

Marc Fromm
Information Technology Specialist II
Financial Aid Department
Western Washington University
Phone: 360-650-3351
Fax:   360-788-0251




^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2008-03-13 18:41 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-05 23:59 Restore from pg_dumpall Buorn, Yoway <Yoway.Buorn@gd-ais.com>
2005-08-06 02:07 ` Jeff Frost <jeff@frostconsultingllc.com>
2005-08-06 04:23 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-08-08 17:41 Re: Restore from pg_dumpall Buorn, Yoway <Yoway.Buorn@gd-ais.com>
2005-08-08 18:01 ` Jeff Frost <jeff@frostconsultingllc.com>
2005-08-16 15:55 Re: Restore from pg_dumpall Buorn, Yoway <Yoway.Buorn@gd-ais.com>
2005-08-16 16:29 ` Alvaro Herrera <alvherre@alvh.no-ip.org>
2005-08-16 22:42 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-03-13 18:41 restore from pg_dumpall Marc Fromm <Marc.Fromm@wwu.edu>

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