Lorsque vous appelezdbbackup spécifier qui pg_dump à utiliser
from django.core.management import call_command
call_command('dbbackup', compress=True, interactive=False)
Je reçois:
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
J'utilise une installation non racine de PostgreSQL (version 9.6.5
) comme back-end pour une application django. (Didacticiel this utilisé pour l'installation.)
Il existe également une installation postgreSQL dans la machine (version 8.4.20
). Avant de passer à l'installation non-root, tout fonctionnait parfaitement. Ma conjecture est que le pg_dump
appelé dbbackup
est toujours celui de l'installation de la racine.
Comment spécifier quel pg_dump utiliser?
Merci pour cette réponse rapide, je l'essaie maintenant! – dendragon
Ça marche! Merci beaucoup! Je ne pouvais pas trouver cela dans les docs de dbbackup :( – dendragon