Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs about running barman commands as postgres user #1037

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading