There isn't an option (at least I couldn't see one). You can export playlists but that is only to a text file. You could try exporting the library (not exactly sure what is in the file though). The alternative is just to remember the playlists and sort them out again when you reinstall (not fun).