Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Package install overwriting configuration

13 views
Skip to first unread message

Jon Schewe

unread,
Oct 22, 2024, 1:31:42 PM10/22/24
to bareos-users
I am using the community packages for bareos from download.bareos.org. I am using the RHEL repository to get my installs.
I have noticed that the default installed configuration files are overwritten each time the bareos packages are upgraded. This is quite annoying as I want to have a setup that doesn't have most of these defaults in place. I tried changing the name of the various resources so that it's clear to my other sysadmins to not use these resources, however I've found that those settings have been overwritten with the latest upgrade.

Some of these files include:
/etc/bareos/bareos-dir.d/pool/{Full,Differential,Incremental}.conf
/etc/bareos/bareos-dir.d/job/BackupCatalog.conf
/etc/bareos/bareos-sd.d/device/FileStorage.conf

Does anyone have a solution to keep upgrades from replacing these files?

Jon

Silvio Schloeffel

unread,
Oct 22, 2024, 3:13:08 PM10/22/24
to bareos...@googlegroups.com
Hi Jon,

I can only say something about
/etc/bareos/bareos-sd.d/device/FileStorage.conf because I have also
changed this file.

As you can see, I can not reproduce your problem.

[root@storage-serv device]# pwd
/etc/bareos/bareos-sd.d/device
[root@storage-serv device]# ls -la
insgesamt 12
drwxr-x---. 2 bareos bareos 4096 11. Okt 14:35 .
drwxr-x---. 8 bareos bareos 4096 11. Okt 14:35 ..
-rw-r-----. 1 bareos bareos 1764 1. Aug 2023 FileStorage.conf

The update does not overwrite the file on my system.
I use also a RHEL system with community packages and the update is done
with dnf and the bareos repo.
Are you sure the update overwrites your file and not another job?

Best

Silvio




Am 22.10.24 um 19:31 schrieb Jon Schewe:
> --
> You received this message because you are subscribed to the Google
> Groups "bareos-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bareos-users...@googlegroups.com <mailto:bareos-
> users+un...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/bareos-
> users/519ec806-1fa0-4bf3-9040-3f9045ddbbd2n%40googlegroups.com <https://
> groups.google.com/d/msgid/bareos-
> users/519ec806-1fa0-4bf3-9040-3f9045ddbbd2n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.


OpenPGP_signature.asc

Jon Schewe

unread,
Oct 22, 2024, 3:27:25 PM10/22/24
to bareos-users
Hmm, maybe it was just that the file had been moved to the side and the update replaced the file. I'll try that again. It would be nice to be able to get rid of the default pools and config files that aren't needed.

Go Away

unread,
Oct 23, 2024, 12:49:27 AM10/23/24
to bareos-users
That's how RPM works.
A "normal" file is always overwritten with a file from a package on update. A file marked as config file within a package is treated differently however. If there is no file in the system or the file in the system has not been edited a new file will always be installed. If there is already a file in the system and it has been edited either a new file will be installed next to the original file with a .rpmnew extension (if the file in the package is marked with a (noreplace) flag as most config files are) or a new version is installed and the old one is saved as .rpmsave version.
Long story short, if you don't want RPM to restore original configs (since they seem to be defined with a noreplace option), you have to modify original files to exist and contain some non-working contents - either truncate the files to zero length or comment out all their text.

MK

To unsubscribe from this group and stop receiving emails from it, send an email to bareos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/3754151b-7e3a-4f62-a73a-00e5d57dd06dn%40googlegroups.com.

Bruno Friedmann (bruno-at-bareos)

unread,
Oct 23, 2024, 4:11:52 AM10/23/24
to bareos-users
One of the best way I know (and use personally) is to take all default installed file and empty them (so they are in place, and next update won't rewrite them because they have been changed), but Bareos will not create the ressource that are in.
So you are on your own redefining everything, but then you got the total control :-)
This work super well with rpm, not sure about that support on other platform.

From time to time when a new configuration file appear, you have to repeat the process, but it is quite rare.

There's another way, where you place you own configuration into a specific directory like /etc/mybareos for example then you overwrite the systemd service unit to ask the daemon to use your configuration instead of the default
mainly using --config (-c) flag. You will then have to alias most of the tool call to also take this configuration directory and not the default bconsole -c /etc/mybareos

Hope this can be considered as food for though and will help somewhat.

Jon Schewe

unread,
Oct 23, 2024, 11:13:22 AM10/23/24
to bareos-users
Thank you, those are both good options. I've tried the idea of commenting out the contents of the files with a comment at the top that this is a default configuration file that we aren't using. This seems like a reasonable solution. I'll keep watching to see if a file gets overwritten, but looking back at the filesystem changes it seems more likely that one of us moved the file to the side and the upgrade happily recreated the file.
Reply all
Reply to author
Forward
0 new messages