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.

  1. sudo sh -c ‘echo “deb http://apt.postgresql.org/pub/repos/apt/ lsb_release -cs-pgdg main” >> /etc/apt/sources.list.d/pgdg.list’
  2. wget –quiet -O – https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add –
  3. sudo apt-get update
  4. sudo apt-get install -y postgresql-client-11
  5. Now, check the version with the below command
    psql -V
  6. You will get the below output
    psql (PostgreSQL) 11.6 (Ubuntu 11.6-1.pgdg18.04+1)

Leave a Reply