I was using OpenElec 8.0.3 on RPi when the system became unstable. Reboots, if at all, took 5-10 minutes. Having a fairly large movie-TV show library, a re-install was a daunting issue. My previous experience with export/import of video library showed that it took an inordinately long time and was not always successful.
This is what I did:
1) I copied the following directories and files from Userdata to one of my attached USB disks
Database
keymaps
peripheral_data
favourites.xml
guisettings.xml
profiles.xml
sources.xml
2) I did a fresh install of not OpenElec but LibreElec
3) I copied over the above directories and files from the USB disk to Userdata directory
4) Rebooted
All my movies and TV shows reappeared after reboot. This procedure took me about 3 minutes. Previously, an export/import of video library took more than 24 hours.
I hope this is helpful.