openhab / openhab-linuxpkg

Repo for Linux packages
Eclipse Public License 2.0
18 stars 33 forks source link

Do not delete the backup files when uninstalling OH via a package manager #229

Open nelsonaponte opened 2 weeks ago

nelsonaponte commented 2 weeks ago

When openHAB is managed by a package manager (apt, yum, dnf) and the user attempts to remove (uninstall) openHAB using the package manager, the folder under /var/lib/openhab/backups/ and all of its content should not be deleted.

If possible, a warning message saying "The backups folder under /var/lib/openhab/backups/ was not automatically deleted so you don't lose data if you want to reinstall openHAB. Please, delete it manually if required." should be displayed once the remove process ended successfully.

Reason

The purpose of this enhancement is to allow users to keep their backups when uninstalling openHAB, in case they need them in the future. Many users may not know or remember there are backups in the folder that they may need later and would forget to manually move them to another location. Moreover, with https://github.com/openhab/openhab-linuxpkg/issues/230, users may now know that there are backups automatically taken before any upgrade process.

BClark09 commented 2 weeks ago

Agreed that the removal of openhab should not delete backups at least without prior warning. At the very least, the backup script should warn the user that a directory outside the package created directories should be used.

I'm away for a couple of weeks - but I'll look into the best options soon after.