Frank Berzau wrote:
Here's how I fully recovered from a destroyed iTunes Library and to a working state of how Music was intended to be used.
Lessons learned:
1) No longer is watching a keynote sufficient. I have to read blogs, support articles and call Apple support in order to get things fully understood and working.
2) iTunes Match is, for the most part, replaced by what Music does, but one important piece is not. Downloading DRM free versions of tracks on other devices.
Step 1 - Disabling iCloud Library
In iTunes Preferences under General uncheck 'iCloud Music Library'. I also, following some other folks advice disabled the option to automatically download Artwork. I'm not sure, but the thought of giving iTunes control over not just filling missing artwork but potentially overwriting existing... No.
Step 2 - Deleting my entire iTunes folder
Emptying the trash right after it. This looked like it gave me enough disk space for the next step, the Restore. However, it did not! When I tried to copy the iTunes Folder from my Time Machine backup, Finder reported it had 'Not enough disk space'. At that point, I ran Disk Utility to Check the disk. I got errors and a prompt saying I should do a repair from the Disk Util run from the Recovery Partition. This was on a MacBook Pro with a 1 TB SSD, a little over a year old. Did that, and then magically there was enough disk space to copy in my good iTunes Folder from the Time Machine backup.
Step 3 - Restoring my iTunes Library from a Time Machine backup
I chose to not simply run Time Machine to go back, but rather first made another copy of the backed up iTunes folder. In my case this was hundreds of Gigabytes copied over WiFi, but - for the sake of making me feel better - worth doing. There are KB articles on the topic of remotely mounting a Time Machine backup file. One thing to be very careful is to NEVER modify or delete any of the content of a Time Machine backup, just simply copying it over to another drive (or in my case another Mac).
Once the copy process was done, which took a few hours (the 4 hours of sleep I granted myself in the process on Friday), I Option (alt) clicked iTunes, which prompts to create or open a different Library. I chose the one I had copied in from Time Machine. Took a while watching the spinning wheel but ultimately it opened my Library and it was all fine.
Step 4 - Creating a clean Library
I did this on another Mac (brand new iMac 5k) but this should - provided you have enough disk space - be possible by switching between libraries by Option-clicking the iTunes icon and choosing the respective (old and new) library. In my case, on the new Mac, I created a new, empty Library and first subscribed to iTunes Match, then enabled the iCloud Music Library. I deleted everything that popped up (thousands of tracks that were already imported during the initial disaster), and just left purchased songs untouched.
Step 5 - Exporting Music and Playlists
Going into my old Library, no iCloud Library enabled still, I copied all Music to my new Mac, by simply dragging and dropping into a Finder window where I had the new Mac's drive mounted. Of course if you do this on a single Mac, this step is obsolete. As far as exporting Playlists, I export them as XML.
Step 6 - Importing Music and Playlists
On my new iMac running the clean new Library, and iTunes Match and Music iCloud Library enabled, I import all Music. I do this with just a couple of thousand tracks each, wait for the cloud upload and a clean state, then continue with the next. I am not done yet, but things look really good. Once all my tracks are imported and uploaded to the Cloud, I will import the XML Playlists and I should be done.
Step 7 - Cleaning up my iPhone Music Library
I noticed that when I enable iCloud Library on my iPhone, even when I chose the option to 'Replace Music with iCloud Library' it doesn't do what I expect. It still has my previously synced Music (from iTunes via cable or Wifi Sync) in addition to what's in the Cloud. So I disabled the iCloud Library again on my iPhone. Opened my old iTunes Library on the Mac and removed the check box for synching Music. This cleared the iPhone. I then went back into settings and enabled the iCloud Library again. Now all the content of my iCloud Library shows up, I can choose to make tracks or albums, or entire Genres, available offline. This part already works great, and as I'm importing more Music into my new iTunes Library and the Cloud gets populated it all shows up on the iPhone pretty instantly.
Very disappointing along the way:
A f****d up iTunes Library (thank you Apple for Time Machine)
Missing DRM-free Music, aka. lack of explaining what iTunes Match still does
Subscribing to iTunes Match took two days and maybe 50 attempts and several calls with Apple Support until it worked
Getting a clean iPhone is not as simple as it looks
It just works - No.