Very simply.
- Make a copy of Preferences.xml
-or-
- Make a full backup of all your metadata thereby making it even easier to recover.
Back up/ Restore /clone your PMS metadata
-or-
- Move the metadata to a non-root partition (e.g. /home) where it will survive anaconda’s reformatting for installation.
Moving PMS 'Library'
Both of these, plus more, can be found here.
https://forums.plex.tv/tags/server-linux-tips