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 On Tue, 22 Oct 2024, 21:27 Jon Schewe, <[email protected]> wrote: > 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. > > On Tuesday, October 22, 2024 at 2:13:08 PM UTC-5 Silvio Schloeffel wrote: > >> 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: >> > 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 >> > >> > -- >> > 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 [email protected] <mailto:bareos- >> > [email protected]>. >> > 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>. >> >> >> -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/bareos-users/3754151b-7e3a-4f62-a73a-00e5d57dd06dn%40googlegroups.com > <https://groups.google.com/d/msgid/bareos-users/3754151b-7e3a-4f62-a73a-00e5d57dd06dn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/bareos-users/CAP_RC6CXv8gPG_%2BbHebMUmZU%2BojAkqHu328K7OWjDX9pSDa1sw%40mail.gmail.com.
