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

Re: [SQL] pg_dump: aborting because of server version mismatch

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Mitesh Shah <mitesh(dot)shah(at)stripes39(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org, adelaide-au-pug(at)postgresql(dot)org, seapug(at)postgresql(dot)org
Subject: Re: [SQL] pg_dump: aborting because of server version mismatch
Date: 2012-05-11 19:39:18
Message-ID: 4FAD6AE6.6000904@gmail.com (view raw or flat)
Thread:
Lists: adelaide-au-pugatlpugaustinpugbostonpugbwpugpgsql-adminpgsql-bugspgsql-sqlseapugsfpug
On 05/02/2012 12:55 PM, Mitesh Shah wrote:
> Hi,
> I am trying to create a daily backup cron script but it fails with an
> error as below:
>
> Any pointers to resolve this will be greatly appreciated.
>
> Thanks,
> Mitesh Shah
> mitesh(dot)shah(at)stripes39(dot)com <mailto:mitesh(dot)shah(at)stripes39(dot)com>
>
> *(1) Error:*
> bash-3.2$ sh pg_backup_rotated_orig.sh
> Making backup directory in /Users/miteshshah/Documents/2012-05-02-daily/
> -e
>
> Performing full backups
> -e --------------------------------------------
>
> Plain backup of mitesh
> *pg_dump: server version: 9.1.2; pg_dump version: 9.0.5*

The problem is you are using an older version of pg_dump to dump a newer 
database. That will not work.
Possible solution:
You are running via cron. Cron has its own environment. Unless you are 
explicit in your pathing you can get surprising results, see above.
Find the path to the 9.1.2 version of pg_dump and use that absolute path 
in your script.

> *pg_dump: aborting because of server version mismatch*
> -e
> All database backups complete!
>

-- 
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

austinpug by date

Next:From: Jon ErdmanDate: 2013-09-04 07:15:00
Subject: Fw: Re: Austin startup week
Previous:From: Christophe PettusDate: 2012-05-03 03:27:28
Subject: Re: [sfpug] pg_dump: aborting because of server version mismatch

bwpug by date

Previous:From: Christophe PettusDate: 2012-05-03 03:27:28
Subject: Re: [sfpug] pg_dump: aborting because of server version mismatch

bostonpug by date

Previous:From: Christophe PettusDate: 2012-05-03 03:27:28
Subject: Re: [sfpug] pg_dump: aborting because of server version mismatch

seapug by date

Next:From: Robert BernierDate: 2012-05-29 16:19:25
Subject: next week's get together
Previous:From: kah42pubDate: 2012-05-10 00:45:18
Subject: PgMag

pgsql-admin by date

Next:From: Jessica RichardDate: 2012-05-12 13:01:10
Subject:
Previous:From: Bruce MomjianDate: 2012-05-11 00:29:52
Subject: Re: Advice/guideline on increasing shared_buffers and kernel parameters

pgsql-bugs by date

Next:From: ThangalinDate: 2012-05-14 02:46:12
Subject: pg_dump: SQL command failed
Previous:From: Tom LaneDate: 2012-05-11 18:32:48
Subject: Re: BUG #6629: Creating a gist index fails with "too many LWLocks taken"

sfpug by date

Next:From: Brian GhidinelliDate: 2012-07-26 19:19:25
Subject: Occasionally slow queries - should I be concerned?
Previous:From: Steve CrawfordDate: 2012-05-04 16:37:31
Subject: Re: SFPUG parking for Amazonstravaganza?

adelaide-au-pug by date

Next:From: John NashDate: 2012-10-15 08:22:00
Subject: WebSphere Application Server support for postgres
Previous:From: Christophe PettusDate: 2012-05-03 03:27:28
Subject: Re: [sfpug] pg_dump: aborting because of server version mismatch

atlpug by date

Next:From: LuckyDate: 2012-06-10 17:22:09
Subject: meetings?
Previous:From: Christophe PettusDate: 2012-05-03 03:27:28
Subject: Re: [sfpug] pg_dump: aborting because of server version mismatch

pgsql-sql by date

Next:From: Adrian KlaverDate: 2012-05-11 19:43:58
Subject: Re: Finding Max Value in a Row
Previous:From: Carlos MennensDate: 2012-05-11 19:30:27
Subject: Re: Finding Max Value in a Row

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