Skip to content

Barman demo user permissions #3683

@josh-heyer

Description

@josh-heyer

Summary

Barman demo needs a couple of clarifications to instructions on user setup:

Background info

Relayed by @zekiyeaydemir :

Hi Team, I noticed a few things in our Barman demo:
https://www.enterprisedb.com/docs/supported-open-source/barman/
In the Backup and Recovery: Single-Server Streaming - Configuring PostgreSQL section:

  1. We give replication permission to the barman user. I know a small thing, it's not a problem, it works, but it can be confusing because replication permission is not given in the barman document.

     createuser --superuser --replication -P barman 
  2. I noticed that we don't add the barman user to the pg_hba.conf file. In the demo, we just add the streaming_barman user to the pg_hba.conf file like this:

    sed -i '$ a host   replication    streaming_barman   all md5' /var/lib/postgresql/data/pg_hba.conf
    

    We do not add a line to pg_hba.conf for the barman user.

I checked 'Installing and Configuring Barman' section :

barman@backup:~$ psql -c 'table pg_hba_file_rules;' -U barman -h pg -d postgres
 line_number | type  |   database    |     user_name      |  address  |                 netmask                 | auth_method | options | error 
-------------+-------+---------------+--------------------+-----------+-----------------------------------------+-------------+---------+-------
          88 | local | {all}         | {all}              |           |                                         | trust       |         | 
          90 | host  | {all}         | {all}              | 127.0.0.1 | 255.255.255.255                         | trust       |         | 
          92 | host  | {all}         | {all}              | ::1       | ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | trust       |         | 
          95 | local | {replication} | {all}              |           |                                         | trust       |         | 
          96 | host  | {replication} | {all}              | 127.0.0.1 | 255.255.255.255                         | trust       |         | 
          97 | host  | {replication} | {all}              | ::1       | ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | trust       |         | 
          99 | host  | {all}         | {all}              | all       |                                         | md5         |         | 
         100 | host  | {replication} | {streaming_barman} | all       |                                         | md5         |         | 
(8 rows)

barman@backup:~$ 

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions