myrtille icon indicating copy to clipboard operation
myrtille copied to clipboard

BUG when updating: Config files are overwriten

Open lars18th opened this issue 4 years ago • 2 comments

Hi @cedrozor ,

When updating to the version 2.9.0 I see that the config files are overwriten. In particular the files Web.config and Default.aspx. Perhaps the editing of last one doesn't require to be supported, but I don't know why you rewrite the config.

So please, can you improve the update process to maintain the old configuration? Or provide a simple method to almost save the old config files.

Thank you!

lars18th avatar Nov 13 '20 10:11 lars18th

The Myrtille installer relies on the MSI engine and, unfortunately, I wasn't able to find the right configuration to support a proper update between releases. Despite having all binaries version incremented (i.e. 2.8.0 - > 2.8.1), some DLLs versions were mixed up after install, which is not good at all. Same for config files, I didn't succeeded having the installer to properly merge them with newer params (like git does). That's why for a long time I had the requirement to uninstall an older Myrtille version first before installing a newer one.

But this was not practical, so I had the installer in forced update mode, which overwrite all existing files (binaries and config files), in order to ensure a proper state (no mixed files versions)... but, indeed, at the expense of loosing custom config between installs.

I will eventually switch to another install engine, or at least dig more to see if it's possible to preserve the custom user settings while updating the config files. Meanwhile, yes, I could backup the old config files before installing new ones.

cedrozor avatar Nov 13 '20 15:11 cedrozor

Hi @cedrozor ,

Thank you for consider this suggestion. From my point of view it will be sufficient to make a backup copy of the replaced files when installing. For example, if the file Default.aspx exists, then make a copy Default.aspx.bak, and if this sencond file exists then copy to Default.aspx.bak1 and so on. Then inform to the user that the configuration is replaced. In this case a manual re-configuration can be done reading the old files that will continue available in the system.

Regards.

lars18th avatar Nov 16 '20 08:11 lars18th