patternsqlMinor
Is there a way to avoid the password prompt in pg_basebackup?
Viewed 0 times
thewaypasswordavoidpg_basebackupthereprompt
Problem
I'm attempting to get a server provisioned using ansible, meaning that I can't type in a password. I'm doing a master-slave topology and I need to run
Is this possible? Or will I have to make a manual stage in my deployment?
pg_basebackup on the slave machine to accomplish this. I've looked into using .pgpass, but that appears to be for my shell user, not the postgres account.Is this possible? Or will I have to make a manual stage in my deployment?
Solution
Create a
Link to the manual: http://www.postgresql.org/docs/current/static/libpq-pgpass.html
.pgpass in the home directory for the postgres user, or whatever user you run pg_basebackup as.Link to the manual: http://www.postgresql.org/docs/current/static/libpq-pgpass.html
Context
StackExchange Database Administrators Q#117339, answer score: 6
Revisions (0)
No revisions yet.