Let BareOS take backup

NethServer Version: 7.6.1810
Module: -
Hi,
I’m using BareOS to take backup on our servers (Ubuntu and Debian). Now I want to backup Nethserver to. BareOS are using port 9101, 9102 and 9103. How do I allow BareOS to connect to Nethserver?
The nethserver server are not acting as firewall, only AD and file server.

I have tried to add rules in firewall via GUI and tested

config set myservice service status enabled TCPPort 9101,9102,9103 access green
signal-event firewall-adjust

Nothing happens and I don’t know where it is stopped.

How can I open incoming ports? In which log file can I see what is stopped in firewall?

try -> TCPPorts

config set myservice service status enabled TCPPorts 9101,9102,9103 access green

Thank you, that works a little bit more. The backup stopped anyway.
I did open for all traffic in the firewall to and from the backup server and it working even more but it cannot take backups.
The last thing that solved the last piece was in /etc/resolve.conf. I changed the search from:

search mydomain.com

to

search ad.mydomain.com

(the domain name is ad.mydomain.com, of course it is something else instead of mydomain :slightly_smiling_face:)

/PelleH

2 Likes

Nethserver uses a template system.
Changing /etc/resolv.conf is not persistent as it’s templated and will be overwritten.
It should be enough to add a DNS entry on the Nethserver for your bareos server.

2 Likes

We use this port 9001, 9002, 9003 restricted to localhost for rh-php71, rh-php72, rh-php73, does this port are the official one of bareos, what could be the issue to rh-php7X if we open them to the green network ?

Sure it will work but my guess is for vulnerabilities

Sorry for the noise, I was not woke up :D… 9101,9102,9103

A little espresso for @stephdl… Too many codelines.
Take a break man! :grin:

1 Like

yep this time is really fun…for me… a lot of new things are coming

relative to bareos, I am in a learning curve, no lessons to give, but a lot to learn :smiley:
I am currently working to make a rpm, it seems to work well, however I noticed two things to make the backup on a remote nethserver 7

config set bareos-fd service status enabled TCPPort 9102 access green
for client, only the service bareos-fd is needed, it listens on port 9102, the other can be opened but is not needed.

However after the first signal-event runlevel-adjust the service will be down, to make it persistent:

[root@ns7loc10 ~]# mkdir /etc/e-smith/db/configuration/defaults/bareos-fd
[root@ns7loc10 ~]# echo 'service' >  /etc/e-smith/db/configuration/defaults/bareos-fd/type
[root@ns7loc10 ~]# echo 'enabled' >   /etc/e-smith/db/configuration/defaults/bareos-fd/status

you can test it

 signal-event runlevel-adjust
 systemctl status bareos-fd

the second things, maybe due to my development environment tricked…but I needed to put in /etc/hosts the hostname definition of the backup server in the client

in /etc/hosts of the client
192.168.56.12 ns7loc11.nethservertest.org ns7loc11

after this it seems to work.

I am looking now to make the authentication workable with PAM, it could be fun to have the same users between the web ui and nethserver, do you have some experiences with PAM and bareos to share.

1 Like

yum install nethserver-bareos-client

it install bereos-fd and open the port 9002, think when you uploaded the client configuration to restart the service

scp /etc/bareos/bareos-dir-export/client/CLIENT-NAME/bareos-fd.d/director/bareos-dir.conf root@192.168.56.13:///etc/bareos/bareos-fd.d/director/ && ssh root@192.168.56.13 "systemctl restart bareos-fd"

Thanks for your replies. The yum install nethserver-bareos-client would probably solve the firewall problem. The other problem is probably some wrong config in BareOS, the server sends its name without domain name (backupserver instead of backupserver.ad.mydomain.com).

/PelleH

during the bareos installation I can read this during the yum transactions

  Installing : bareos-director-19.2.6-2.el7.x86_64                                                                                                                                                                                       5/15 
replacing 'XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX' with 'ns7loc11' in /etc/bareos/bareos-dir.d/storage/File.conf
replacing 'XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX' in /etc/bareos/bareos-dir.d/director/bareos-dir.conf
replacing 'XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX' in /etc/bareos/bareos-dir.d/client/bareos-fd.conf
replacing 'XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX' in /etc/bareos/bareos-dir.d/storage/File.conf
replacing 'XXX_REPLACE_WITH_DIRECTOR_MONITOR_PASSWORD_XXX' in /etc/bareos/bareos-dir.d/console/bareos-mon.conf
replacing 'XXX_REPLACE_WITH_DATABASE_DRIVER_XXX' with 'postgresql' in /etc/bareos/bareos-dir.d/catalog/MyCatalog.conf
  Installing : bareos-filedaemon-19.2.6-2.el7.x86_64                                                                                                                                                                                     6/15 
replacing 'XXX_REPLACE_WITH_LOCAL_HOSTNAME_XXX-fd' with 'ns7loc11-fd' in /etc/bareos/bareos-fd.d/client/myself.conf
replacing 'XXX_REPLACE_WITH_CLIENT_PASSWORD_XXX' in /etc/bareos/bareos-fd.d/director/bareos-dir.conf
replacing 'XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX' in /etc/bareos/bareos-fd.d/director/bareos-mon.conf
replacing 'XXX_REPLACE_WITH_CLIENT_MONITOR_PASSWORD_XXX' in /etc/bareos/tray-monitor.d/client/FileDaemon-local.conf
  Installing : bareos-bconsole-19.2.6-2.el7.x86_64                                                                                                                                                                                       7/15 
replacing 'XXX_REPLACE_WITH_DIRECTOR_PASSWORD_XXX' in /etc/bareos/bconsole.conf
  Installing : bareos-client-19.2.6-2.el7.x86_64                                                                                                                                                                                         8/15 
  Installing : bareos-tools-19.2.6-2.el7.x86_64                                                                                                                                                                                          9/15 
  Installing : bareos-storage-19.2.6-2.el7.x86_64                                                                                                                                                                                       10/15 
replacing 'XXX_REPLACE_WITH_STORAGE_PASSWORD_XXX' in /etc/bareos/bareos-sd.d/director/bareos-dir.conf
replacing 'XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX' in /etc/bareos/bareos-sd.d/director/bareos-mon.conf
replacing 'XXX_REPLACE_WITH_STORAGE_MONITOR_PASSWORD_XXX' in /etc/bareos/tray-monitor.d/storage/StorageDaemon-local.conf
  Installing : bareos-19.2.6-2.el7.x86_64                                                                                   

I think I forgot to drop a line in the dns side of the client