django-dbbackup icon indicating copy to clipboard operation
django-dbbackup copied to clipboard

Error running `pg_dump` with `--no-password`

Open JesusZerpa opened this issue 4 years ago • 3 comments
trafficstars

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 

image

Versions

3.3.0

Django-dbbackup

pip 21.1.3

External tools

  • Python: 3.8.10
  • Django: 3.2.4
  • OS: Linux

JesusZerpa avatar Oct 30 '21 02:10 JesusZerpa

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 avatar Oct 30 '21 03:10 JesusZerpa

@JesusZerpa Please submit a PR for this when you get a chance.

Archmonger avatar Dec 25 '21 01:12 Archmonger

Please correct it asap. It is failing due to --no-password pip install django-dbbackup

andychoi avatar Jun 28 '22 14:06 andychoi