View Issue Details

IDProjectCategoryView StatusLast Update
0001515bareos-coreGeneralpublic2023-03-02 14:14
ReporterMarceloRuiz Assigned Tobruno-at-bareos  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionwon't fix 
PlatformLinuxOSanyOS Version3
Product Version22.0.2 
Summary0001515: Bareos overrides the user configuration with updates
DescriptionI am filing a new bug because my previous one [1512] was closed and I can't find a way to continue the discussion. There is no dropdown option to select Ubuntu 22.04 (the newest version shown is 16.04) and that's why I selected 'Linux any 3', but the problem also is present in BSD systems.

Bareos should not touch an existing '/etc/bareos/' folder if it exists. That means that a user spent a considerable amount of time configuring the program and a simple system update will make the whole configuration invalid and Bareos won't even start.
If there is a need to provide a sample configuration, do it in a separate folder, like '/etc/bareos-sample-config' so it won't break a working configuration. The installer/updater could even delete that folder before the install/update and recreate to provide an up-to-date example of the configuration for the current version without risking breaking anything.
Steps To ReproduceInstall Bareos, configure it and let the package manager update the version.
Additional InformationThis is the partial answer to my problem, which I find sub-optimal:
-----
One of the best way is to simply comment or keep them empty, so no changes will happen on update.
It is how it is actually, as we didn't have find a way to make the product as easy as possible for newcomer proposing a ready to use configuration.
Our the expert side, you can also simple create your personal /etc/bareos-production structure and create systemd overwrite service to use and point to that location.
-----
Now, the solution should not be to leave empty files with no reason to be around the current configuration other to prevent and ill-thought upgrade process to break a working configuration.

For example:

- If configuring bconsole using the new folder structure is allowed ('bconsole.d' folder inside '/etc/bareos/'), why would users need to leave a blank 'bconsole.conf' file around so the update process won't create a new one with sample configuration? The installer/updater does not even check if the folder 'bconsole.d' exists before creating a sample 'bconsole.conf' file.
- If the user decides to replace file names with ones with more meaningful names that produce a valid and working configuration, why would he/she need to leave blank files everywhere to prevent their creation?

The comment about making the system easier for new users implies that it is OK to break the configuration for existing users. That should not be the case at all.
There are many relatively painless possible solutions that would satisfy both the concern about having an almost-ready configuration for new users and also respecting existing, valid and working configurations for existing users:

- Install the configuration in a folder like '/etc/bareos-sample-config' that could be completely erased and recreated with each update in case changes in the configuration structure are part of the upgrade (like when Bareos changed to the new directory structure). If the folder '/etc/bareos' does not exist, copy the contents from '/etc/bareos-sample-config' to '/etc/bareos' or ask the user to do that. After all, the sample configuration is not a working configuration. The most important rule should be If '/etc/bareos' exists, don't touch it!

- Create sample configurations inside '/etc/bareos/sample-configuration' or another folder that should not be processed by Bareos at all. This might be a little bit more complex to implement but might be the cleanest option, because the user would have only one config folder with everything related to Bareos.

The above approaches have the benefit of making the sample configuration available for current users for easy reading, but the the following one should be the bare-minimum solution:

- If '/etc/bareos' is maked as read only, do not override it!

Lastly, asking the user to create a different config structure than what the manual uses and modifying systemd files is also a mistake and it goes against the system being as user-friendly as possible. If for whatever reason Bareos decides to update/improve the files to solve any problem (like preventing the file-daemon to block a quick shutdown on linux systems) the new files would override the old ones and the custom configuration there will also be gone.

Why is it so unreasonable to pretend Bareos not to touch an existing working configuration and the burden needs to be passed to the user? I sincerely don't know of any software that does that.
Tagsbsd, config, configuration, ubuntu22.04

Activities

bruno-at-bareos

bruno-at-bareos

2023-03-02 14:13

manager   ~0004890

The developer team has confirmed that behavior will not be changed without a big amount of effort (can mean also money).
You're free to open a PR to change configuration, code and packaging.

This ticket will be closed as nothing will be changed.
bruno-at-bareos

bruno-at-bareos

2023-03-02 14:14

manager   ~0004891

No changes will be implemented without external resources.

Issue History

Date Modified Username Field Change
2023-02-23 21:45 MarceloRuiz New Issue
2023-02-23 21:45 MarceloRuiz Tag Attached: bsd
2023-02-23 21:45 MarceloRuiz Tag Attached: config
2023-02-23 21:45 MarceloRuiz Tag Attached: configuration
2023-02-23 21:45 MarceloRuiz Tag Attached: ubuntu22.04
2023-03-02 14:13 bruno-at-bareos Note Added: 0004890
2023-03-02 14:14 bruno-at-bareos Assigned To => bruno-at-bareos
2023-03-02 14:14 bruno-at-bareos Status new => closed
2023-03-02 14:14 bruno-at-bareos Resolution open => won't fix
2023-03-02 14:14 bruno-at-bareos Note Added: 0004891