I recently rented a MacBook Pro because I needed to take mine in for a hardware recall. Before giving mine up, I transferred the folder ~/Music/iTunes
and the file ~/Library/Preferences/com.apple.iTunes.plist
to the loaner laptop in order to have my music available. (I also made two separate Time Machine backups right before taking it in, and had an online backup service for extra peace of mind.)
As it turned out, only a fraction of my library was available in iTunes, some of the oldest files in my collection plus my purchases. (Also, when I made my first iPhone backup on this laptop, that large portion of the library disappeared from Music as well.)
My best guess is that, as an inexperienced user sometime in the past, I had turned off "Copy files to iTunes Media folder when adding to library" in iTunes Preferences. (I can't know for sure because I don't have my original Mac, but only those older files are in Music/iTunes/iTunes Media
.) So as I added new tracks collected over time, they were added to iTunes but somehow not into that media folder.
I had deleted those source files over time, however, and they remained viable in the iTunes library. So now I am looking for where exactly they were located, so I can try to restore them from backup.