Add support for pgsql "peer" authentication
I can't get the PostgreSQL backup working on Ubuntu 12.04.
Here's what I get when I try to run the command:
Info: >>>> starting action /etc/backup.d/20.pgsql (because of --now) Debug: yes Debug: executing handler in locked section controlled by /var/lock/backupninja/_etc_backup.d_20.pgsql Debug: chown 103 /srv/backups/postgres Debug: chmod 700 /srv/backups/postgres Debug: su - postgres -s /bin/bash -c "set -o pipefail ; /usr/bin/pg_dumpall | /bin/gzip --rsyncable > '/srv/backups/postgres/rain.example.com-all.sql.gz'" Warning: -su: /srv/backups/postgres/rain.example.com-all.sql.gz: Permission denied No directory, logging in with HOME=/ Warning: Failed to dump pgsql cluster Warning: <<<< finished action /etc/backup.d/20.pgsql: WARNING
This is with the standard Ubuntu configuration of PostgreSQL that uses "peer" authentication for local connections. From pg_hbe.conf:
# Database administrative login by Unix domain socket local all postgres peer # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all peer
(from redmine: created on 2012-07-31)