autopostgresqlbackup erro de autenticação postgres

1

Estou tentando usar o autopostgresqlbackup no Ubuntu em uma instância do ec2. Eu posso logar com o psql na linha de comando e ele está pegando o meu arquivo .pgpass e tudo parece bem. Quando eu executo 'sudo autopostgresqlbackup' ele simplesmente trava e meu arquivo de erro menciona que ele está esperando por uma senha para o usuário postgres.

Aqui estão meus arquivos de configuração e log de erros. Eu estou usando o usuário do Ubuntu e meu arquivo / home / Ubuntu / .pgpass é configurado com 0600 permissões. Eu estou supondo que isso tem algo a ver com qual usuário estou logado e qual usuário especificar na linha de configuração SU_USERNAME. Devo estar configurando SU_USERNAME = ubuntu? Qualquer ajuda aqui seria apreciada. Obrigado.

/ etc / default / autopostgresqlbackup

# ===============================
# === Debian specific options ===
#================================

# By default, on Debian systems, only 'postgres' user
# is allowed to access PostgreSQL databases without password.
# In order to dump databases we need to run pg_dump/psql
# commands as 'postgres' with su.
#
# The following setting has been added to workraound this issue.
# (if it is set to empty, 'su' usage will be disabled)
SU_USERNAME=postgres

#=====================================================================
# Set the following variables to your system needs
# (Detailed instructions below variables)
#=====================================================================

# Username to access the PostgreSQL server e.g. dbuser
USERNAME=postgres

# Password
# create a file $HOME/.pgpass containing a line like this
#   hostname:*:*:dbuser:dbpass
# replace hostname with the value of DBHOST and postgres with 
# the value of USERNAME

# Host name (or IP address) of PostgreSQL server e.g localhost
DBHOST=localhost

# List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
DBNAMES="all"

/var/lib/autopostgresqlbackup/ERRORS_localhost-881271020.log

Password for user postgres: 
Session terminated, terminating shell... ...killed.

pg_hba.conf

local   all             postgres                                md5
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
host        all         all      207.244.165.220/32        md5
host        all         all      207.244.173.30/32        md5
    
por Stephen Burke 01.12.2014 / 15:16

0 respostas