How To Fix `pg_dump: aborting because of server version mismatch`
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 commands.
- 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
- Now, check the version with the below command
psql -V - You will get the below output
psql (PostgreSQL) 11.6 (Ubuntu 11.6-1.pgdg18.04+1)