I'm trying to backup a local database in my laptop (PostGresSQL 9.6 ,PgAdmin3) and I see the following error.
pg_dump: server version: 9.6.3; pg_dump version: 9.5.5 pg_dump: aborting because of server version mismatch
I've tried some answers on SO, like updating the postgres on homebrew but it threw an error as well.
Error: postgres not installed
When I checked the contents of postgres application package, I found 2 folders in the versions folder, 9.5 and 9.6. I tried running the pg_dump in the bin folder of both the versions and all I see is this error:
Can someone help me to solve this problem and make a backup of my database
sql , which uses the plain or SQL format, the pg_dump command does not store any file anywhere. It just sends the output to STDOUT , which is usually your screen, and it's done.
restores to earlier versions not working.
pg_dump can be used to backup an entire database, then pg_restore can be used to examine the archive and/or select which parts of the database are to be restored. The most flexible output file formats are the “custom” format ( -Fc ) and the “directory” format ( -Fd ).
If using brew on MacOS brew install [email protected]
Homebrew install specific version of formula?
Stop postgres
brew services stop postgresql
Upgrade with Homebrew
brew update
brew upgrade postgresql
Check Version:
psql --version
> psql (PostgreSQL) 10.3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With