Well today i have become a victim of  “i know my computer knows what i mean” turns out that is not the case in some aspects. Straight to the point i have had this “problem” on my local developer machine every time i tried to dump the a database from my Bitnami LAPP stack.

The situation is was exacerbated by the fact that am running two instances of PostgreSQL one naturally from my Ubuntu OS and another one from my bitnami stack,For my case my Bitnami LAPP version is newer and this means every single time i tried to run

$ pg_dump db_name > db_dump.sql i ended up with the error “pg_dump: aborting because of server version mismatch“. So for all those who are dealing with this issue here are the  things to note – the wrong assumption you are making include

  1. The the ” $ pg_dump” actually refers to the pg_dump that is found under your Bitnami LAPP installation dir

Remedy :

Explicitly call the the Bitnami LAPP stack pg_dump from the commandline to execute the command without errors i.e

$ /opt/lappstack54/postgresql/bin/pg_dump => calling the pg_dump from the Bitnami Installation directory and not the one that belongs to the Ubuntu’s PostgreSQL i.e not “/usr/lib/postgresql/{pg_version}/bin/pg_dump”

$ /opt/lappstack/postgresql/bin/pg_dump -U postgres -p 2346 -h ’′ {my_db} > /home/madelonix/Downloads/{my_db}.sql