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)
10 Replies to “How To Fix `pg_dump: aborting because of server version…”
Thanks a lot Tejaswini !
This worked for me 🙂
Great! worked like a champ
thanks for sharing
thanks a lot
Worked a treat 🙂 thanks!
Awesome, Thanks for sharing
It worked . Thanks for sharing