Official comment
The easiest way to do this is to File > Library > Backup Library, and when you're asked if you want to include all the music, say "Yes."
Close rekordbox, wipe your drive of all the music you have (or just stick it all somewhere safe for the time being), then open rekordbox and restore the backup you just made using File > Library > Restore Library. It will prompt you for where you want to restore the music (which was in a folder beside the database backup, but will be moved into one consolidated location of your choosing).
There will be no re-analysis required and all your hot cues and other changes will be restored as well.