Description
Hi,
I am doing a postgresql backup on linux and I get a binary file. To restore it we need to use pg_restore.
I'd like to have a RAW SQL file where I can run a regular psql command.
How to do that ?
In the documentation it is written :
Postgres uses by default dbbackup.db.postgresql.PgDumpConnector, but we advise you to use dbbackup.db.postgresql.PgDumpBinaryConnector. The first one uses pg_dump and pqsl for its job, creating RAW SQL files.
The second uses pg_restore with binary dump files.
They can also use psql for launching administration command.
In the documentation it is written :
dbbackup.db.postgresql.PgDumpConnector for django.db.backends.postgresql
My database configuration is
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql',...
May be the documentation should be updated to say that
dbbackup.db.postgresql.PgDumpBinaryConnector for django.db.backends.postgresql
Which is probably the right thing:
https://github.com/jazzband/django-dbbackup/blob/master/dbbackup/db/base.py
Or ....?
Should I add
DBBACKUP_CONNECTOR_MAPPING = {
'django.db.backends.postgresql': 'dbbackup.db.postgresql.PgDumpConnector',
}