Forums

possible to run a newer pg_dump?

Trying to use pg_dump to backup a PostreSQL server on another cloud.

pg_dump: server version: 11.3 (Ubuntu 11.3-1.pgdg18.04+1); pg_dump version: 9.4.19

pg_dump: aborting because of server version mismatch

Is it possible for me to install and use an upgraded pg_dump ? Thanks.

We have the pg_dump that matches the version of Postgres that we supply to our users, so we cannot upgrade it for you. However, you can do the pg_dump remotely on the machine in question because it will have the correct version of pg_dump for the server installed there:

ssh username@dbserver pg_dump books > books.out

Hello, I'm running a task to backup my postgress db with this command: pg_dump --host='someone.postgres.pythonanywhere-services.com' --port='373737' --username=blobby -w --format=c --file=pgbackupdate +%F-%H%M.dump mydatabase

I am getting this message logged in the task log:

pg_dump: server version: 12.2 (Ubuntu 12.2-2.pgdg16.04+1); pg_dump version: 9.4.19 pg_dump: aborting because of server version mismatch How do I fix this?

It looks like you have a Postgres 12 database, and the client tools installed in your system image are not compatible with that version of Postgres. There are two steps we need to do to fix this:

  • Update your system image to our latest one; this will provide you with the latest version of the operating system, and to more up-to-date versions of Python. However, one word of warning -- because of the changes to the point releases of Python (eg. 3.7.0 to 3.7.5), any virtualenvs you have might break -- and if you're not using virtualenvs, the pre-installed Python modules will be upgraded so that might break any code you have that relies on the old installed versions. If you're happy for us to switch you over despite that, then let us know.
  • Install the latest client tools; this is a script that you need to run after we've updated your system image; I can give you the details once that's done.

@giles - is the ssh command above still expected to work? Here's what I get:

> ssh paulbissex@paulbissex-2826.postgres.pythonanywhere-services.com  
ssh: connect to host paulbissex-2826.postgres.pythonanywhere-services.com port 22: Connection refused

(That's from my PA instance. From my own computer, it times out.

No, what do you try to do?

@fjl I don't understand your response. I'm trying to ssh to my PG instance per @glenn's post of July 18, 2019. It's not working. I want some advice from staff on how to proceed.

The command doesn't seem to work anymore -- if you want to implement backups, check this help page. If you want to access your pg server from outside of PythonAnywhere, check this help page.