When calling
from django.core.management import call_command
call_command('dbbackup', compress=True, interactive=False)
I get:
CommandConnectorError: Error running: pg_dump xxx --host=localhost --port=xxx --username=xxx --no-password --clean
pg_dump: server version: 9.6.5; pg_dump version: 8.4.20
pg_dump: aborting because of server version mismatch
I'm using a non-root installation of PostgreSQL (version 9.6.5) as backend for a django application. (Used this tutorial for the installation.)
There is also a postgreSQL installation in the machine (version 8.4.20).
Before I switched to the non-root installation, everything worked flawlessly.
My guess is that the pg_dump called in dbbackup is still the one from the root installation.
How can one specify which pg_dump to use?