Q: Where is replay gain info saved?
A: Replay gain info is stored in the library (aka database) and in the file tags when possible (if file tagging is not disabled).
Currently file tagging is possible with all internally decoded audio formats. For Wave and AIFF it must enabled in the plug-in manager options (
http://wiki.jriver.com/index.php/WAV_%26_AIFF_Tagging).
Naturally it would be best to back up both, i.e the library and the media files (which include the replay gain tags).
The library contains lots of stuff that is not stored in the file tags, for example: the playback statistics, import dates, all view customizations, playlists, auto-import configuration and recently also the actual options (which are set in Tools > Options...). Use File > Library > Back Up Library... to create a backup file. If you use more than one library you must back them up separately: load a library and back it up, then load the next library and back it up and so on.