Re: [SQL] pg_dump: aborting because of server version mismatch - Mailing list pgsql-bugs

From Adrian Klaver
Subject Re: [SQL] pg_dump: aborting because of server version mismatch
Date
Msg-id 4FAD6AE6.6000904@gmail.com
Whole thread Raw
In response to pg_dump: aborting because of server version mismatch  (Mitesh Shah <mitesh.shah@stripes39.com>)
List pgsql-bugs
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.shah@stripes39.com <mailto:mitesh.shah@stripes39.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.klaver@gmail.com

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6629: Creating a gist index fails with "too many LWLocks taken"
Next
From: Thangalin
Date:
Subject: pg_dump: SQL command failed