Will OH2.2 reinstall cause config file loss?

Hi,
I discovered yesterday that my SD card ‘silently’ corrupted and I’m slowly recovering including many packages reinstall. Through debsums I found that some files from OH2 are suspicious

/usr/share/openhab2/runtime/system/org/ops4j/pax/web/pax-web-features/6.0.7/pax-web-features-6.0.7-jettyconfig.xml
/usr/share/openhab2/runtime/system/org/ops4j/pax/web/pax-web-jetty/6.0.7/pax-web-jetty-6.0.7.jar
/var/lib/openhab2/etc/org.ops4j.pax.url.mvn.cfg
/var/lib/openhab2/etc/config.properties

and what worries me are the 2 first lines. First one is xml but still I can’t list it with ‘more’ (seems to have some binary content or corrupted), jar I can’t assess.
I was thinking about reinstalling the whole OH but I don’t know whether this will override any existing config (items, logging, etc). Installation is pretty wide now and eventhough I’m doing daily backup I don’t want to restore configs manually.
Thanks in advance for all advises.

Using

sudo apt install --reinstall openhab2

Will reinstall without replacing your own configuration.

Are you using openHABs backup script? The accompanying restore script should sort the configuration out for you.

Benjy, thanks. Regarding reinstall method I am using the one listed by you. I am not afraid of config under /etc but mostly about something in other places (e.g. java logging, etc). I guess this will be changed, won’t it?
when it comes to backups - no, I’m using rsync for broader backup (OH2 including).

Anything created by openHAB dynamically is registered as a configuration file. So the logs stored in /var/log/openhab2, and anything in /var/lib/openhab2 will also be kept on a reinstall. Hope that helps?

The files in /var/lib/openhab2/etc is a special case, the majority of files here are replaced but this shouldn’t affect anything noticeable.

Benjy, yes it does. I will then do it tonight and migrate to a new SD.