barman installation without root priviledges – where to put barman.conf?

All we need is an easy explanation of the problem, so here it is.

I am trying to figure out a Barman-2.13 installation via Ansible from the source code from github as barman user inside /opt/barman (which also is the home of the barman user).
I use the barman manual as a guideline.

The challenge I am facing is that I do not have root priviledges on the target (a rhel8 VM) and likewise can not use /etc/barman which is the default location for the barman.conf file.

How would you go about this? Or, in other words, where to put the barman.conf and have barman know about it? I wonder whether I have to adjust the setup.py for this?

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

The barman manual clearly states in several places that some commands must be run as the root user, for example:

Installing Barman is as easy. As root user simply type:
. . .
Then, as root simply type:

Simply put, if you do not already have this access to your VM, then you need to get it.
You might be able to get a "single-user" installation up and running without root/sudo access to the VM, but I seriously recommend you get yourself the Right Tools for the the Right Job.

Method 2

It looks like I found the answer here

in short … a $HOME/.barman.conf (home dir of the barman user) overrides the default systemwide /etc/barman/barman.conf.

If things are set up this way you would not need sudo any longer. Neiterh for installing, nor operating barman I think.

If this is not accurate I am happy to hear arguments on why not.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply