How To Fix `pg_dump: aborting because of server version mismatch`

Tejaswini Polaka

24 sec read

If you face the error pg_dump: server version: 11.6 (Debian 11.6-1.pgdg90+1); pg_dump version: 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1) and pg_dump: aborting because of server version mismatch, then you can fix it by upgrading your PostgreSQL client by following the below command.

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y postgresql-client-11

that’s it. You can check whether the correct version is installed or not by checking the version.

~$ psql -V
psql (PostgreSQL) 11.6 (Ubuntu 11.6-1.pgdg18.04+1)
Related posts:

10 Replies to “How To Fix `pg_dump: aborting because of server version…”

Leave a Reply

Your email address will not be published. Required fields are marked *