Import selected items from one iTunes library to another, with metadata Is it possible to import a few selected items from one iTunes library to another, including their iTunes-specific metadata — ratings, play counts, etc?

My specific circumstances: yesterday, I was tidying up a bunch of my music’s info (correcting some dates, artist listings, etc, since especially for classical music, the ones provided by CDDB are rather inconsistent).  Unfortunately, I accidentally deleted a few collections that I didn’t mean to, and didn’t notice until I’d already emptied the trash.  Fortunately, I have a backup of my whole library from a couple of weeks ago.  So I’d like to restore the deleted albums from the backup, but not the whole library, since I don’t want to lose the work I did yesterday.
What you're asking, technically, can be done however not automatically.  In other words you'd have to add back the songs to the Library and then manually edit the "iTunes Music Library.xml" file to restore the non-encapsulated meta data.

I'd first manually restore the hierarchal folder structure as needed, that's missing, into the existing "~/Music/iTunes/iTunes Media/Music" folder for each artist/album from the backup and then from iTunes > File > Add to Library... select the restored folders to bring them back into the iTunes Library.

Okay, that's the easy part, the songs are back in the Library however the ancillary meta-data will now have to be updated manually by editing the working "iTunes Music Library.xml" file using the information in the backed up copy of that file while iTunes is closed and the working file is first backed up before editing. This is not an operation for the faint of heart and it's geek factor is hi.

Otherwise, after adding back the songs your other option is if you also have your music on a iDevice you can selectively import into iTunes some ancillary meta-data from the iDevice using iMazing.