Skip to content

Commit

Permalink
Add docs about running barman commands as postgres user
Browse files Browse the repository at this point in the history
  • Loading branch information
defilippomattia committed Dec 4, 2024
1 parent 820b7a4 commit 47be967
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/user_guide/recovery.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ Remember that the :ref:`barman get-wal <commands-barman-get-wal>` command should
be executed as the ``barman`` user, with the necessary permissions to access WAL files
from the catalog, which is why ``sudo -u barman`` is used in this example.

To allow the ``postgres`` user to run the ``get-wal`` command as the ``barman`` user,
you can add the following line to the ``/etc/sudoers`` file:

.. code-block:: text
postgres ALL=(barman) NOPASSWD: /usr/bin/barman get-wal SERVER_NAME *
For remote recovery, setting ``recovery_options`` to ``get-wal`` will create a
``restore_command`` using the :ref:`commands-barman-cli-barman-wal-restore` script,
which is designed to handle SSH connection errors more robustly.
Expand Down

0 comments on commit 47be967

Please sign in to comment.