Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PGPASSFILE not getting passed to sql-dump #4022

Closed
kalpaitch opened this issue Mar 29, 2019 · 3 comments
Closed

PGPASSFILE not getting passed to sql-dump #4022

kalpaitch opened this issue Mar 29, 2019 · 3 comments

Comments

@kalpaitch
Copy link

kalpaitch commented Mar 29, 2019

I am running drush sql-dump on a postgres 9.5 instance, and it's still asking for a password prompt.

Running: drush @xxxxx.xxxxx sql-dump --result-file='/tmp/db-dump-test-unsanitized.sql' --extra='-O -x' --verbose
Loaded alias @xxxxx.xxxxx from file /var/www/xxxxx/web/sites/all/drush/xxxxx.aliases.drushrc.php    [notice]
Executing: PGPASSFILE=/tmp/drush_bZy0Wm psql -q --dbname=par --host=localhost --port=5432 --username=xxxxx  --no-align --field-separator="	" --pset tuples_only=on --file /tmp/drush_2z1SbB
Calling system((pg_dump  par --host=localhost --port=5432 --username=par -O -x --clean && pg_dump --schema-only --table=flood --table=sessions --table=watchdog xxxx --host=localhost --port=5432 --username=xxxxx -O -x --clean) > /tmp/db-dump-test-unsanitized.sql);
Password: 

I was expecting drupal to pass the pwd to postgres by writing a temporary PGPASSFILE, which it seems to do for the psql command, but perhaps it's not passing that along to the pg_dump command??

System Configuration

Drush 8.18
Drupal 8.6
PHP 7.1

@weitzman
Copy link
Member

weitzman commented Mar 29, 2019

Fixed in Drush 9.6

@kalpaitch
Copy link
Author

kalpaitch commented Apr 2, 2019

See #3330 (comment) parent issue requires further work

@jcnventura
Copy link

This needs a backport to Drush 8, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants