django-dbbackup
django-dbbackup copied to clipboard
Error running `pg_dump` with `--no-password`
Bug Report
Describe the bug
when run comand: python manage.py dbbackup
To Reproduce
run comand: python manage.py dbbackup
Expected behavior
Expected behavior is created backup file, I checked the code and the reason is when it load PGPASSWORD for any reason django_db backup it is putting quotation marks to password, I repeated operation manually with a subprocess without quotation marks that this library it is putting and it work
my django project working good with same DATABASES settings so I think its something of django_dbbackup
Screenshots or reproduction
dbbackup.db.exceptions.CommandConnectorError: Error running: pg_dump --host=localhost --port=5432 --username=zerpatec --no-password --clean zerpatechnology pg_dump: error: falló la conexión al servidor en «localhost» (127.0.0.1), puerto 5432: FATAL: la autentificación password falló para el usuario

Versions
3.3.0
Django-dbbackup
pip 21.1.3
External tools
- Python: 3.8.10
- Django: 3.2.4
- OS: Linux
The cause of the error is the quote () function that is in get_escaped_command_arg in the utils.py file when I remove it it worked
@JesusZerpa Please submit a PR for this when you get a chance.
Please correct it asap. It is failing due to --no-password
pip install django-dbbackup