Manually back up your iTunes library

If you're not employing a Mac-wide backup service or you just want to back up your iTunes library, specifically, here's how to go about that.
  1. In the Finder, go to Users > [your username here] > Music.
  2. Select the folder labeled iTunes.
  3. Copy it over to your backup drive or online backup service, if you have one. (If you don't have a backup drive, right-click on the folder and select Duplicate.)

Get your songs off iCloud Music Library with iTunes Match

If you don't have a backup and your songs are scattered across multiple computers, you can use iCloud Music Library with an iTunes Match account to unify your libraries on one computer. Here's how.
  1. Pick the computer you want your canonical library to live on.
  2. Open iTunes.
  3. Make sure iCloud Music Library is enabled in iTunes > Preferences > General.
  4. Go to the My Music tab.
  5. Click on the view type dropdown in the upper right corner of the screen. 
    1.                 Click on the iCloud Download option.