using non super user role

595 views
Skip to first unread message

Luca Ferrari

unread,
Feb 6, 2021, 5:05:00 PM2/6/21
to Barman, Backup and Recovery Manager for PostgreSQL
Hi all,
running barman 2.12 against postgresql 12, I'm trying to demote my
backup user to a normal user, so I granted the replication permission
and the following ones:

GRANT EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) to backup;
GRANT EXECUTE ON FUNCTION pg_stop_backup() to backup;
GRANT EXECUTE ON FUNCTION pg_stop_backup(boolean, boolean) to backup;
GRANT EXECUTE ON FUNCTION pg_switch_wal() to backup;
GRANT EXECUTE ON FUNCTION pg_create_restore_point(text) to backup;
GRANT pg_read_all_settings TO backup;
GRANT pg_read_all_stats TO backup;


as per documentation here <http://docs.pgbarman.org/release/2.12/>.
However, a `barman check` command reports:

$ barman check miguel
Server miguel:
PostgreSQL: OK
no access to backup functions: FAILED (privileges for
PostgreSQL backup functions are required (see documentation))
PostgreSQL streaming: OK
wal_level: OK



Therefore, some permission is missing somewhere. Any help?

Thanks,
Luca

Luca Ferrari

unread,
Feb 7, 2021, 7:59:11 AM2/7/21
to Barman, Backup and Recovery Manager for PostgreSQL
On Sat, Feb 6, 2021 at 11:04 PM Luca Ferrari <fluc...@gmail.com> wrote:
>
> Hi all,
> running barman 2.12 against postgresql 12, I'm trying to demote my
> backup user to a normal user, so I granted the replication permission
> and the following ones:
>
> GRANT EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) to backup;
> GRANT EXECUTE ON FUNCTION pg_stop_backup() to backup;
> GRANT EXECUTE ON FUNCTION pg_stop_backup(boolean, boolean) to backup;
> GRANT EXECUTE ON FUNCTION pg_switch_wal() to backup;
> GRANT EXECUTE ON FUNCTION pg_create_restore_point(text) to backup;
> GRANT pg_read_all_settings TO backup;
> GRANT pg_read_all_stats TO backup;
>

My fault, I issued the grants on the wrong database while I was using
a specific database for the barman connection.

Luca
Reply all
Reply to author
Forward
0 new messages