You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How To Restore Music Library from Backup

Hello everyone,


I am subscribed to Apple Music, using it on a Mac and and iPhone. Last week I accidentally deleted everything in my Mac's Music.app. I selected all songs, clicked "Delete from Library" and there everything went. Within seconds, everything was gone from my other devices and from music.apple.com as well, I know...


No problem, I thought, as I have Both a recent Time Machine backup and a copy of my user folder. However, if I overwrite the content of user/Music/Music with the backup and start the Music.app again, nothing I ever added to my Apple Music library is there anymore. Only the music files physically present on the SSD were still there.


Next, I exported the information in "user/Music/Music/Music Library.musiclibrary" to an XML file via File -> Library -> Export Library. When I browse through this XML I can clearly see not only the physical files, but also I ever added to the library (but never physically downloaded, just streamed) from Apple Music.


I contacted Apple Support, but they told me there is no way to restore that information.


Have any of you ever experienced this? Do you know of a way to maybe restore information in a organised manner from the XML?


best,


geb


MacBook Pro 16", macOS 10.15

Posted on May 22, 2020 7:27 AM

Reply

Similar questions

7 replies

May 22, 2020 2:23 PM in response to gebseng2

It's not quite clear to me why the Apple Music tracks I had added earlier can't be re-added to the Music library after a restore of "Music Library.musiclibrary",

Did you download the tracks or were you streaming them? You can use Apple Music on both ways. If streaming, the actual music file was never on your Mac.


Here are 2 songs on my Mac. One is local and one isn't.


May 22, 2020 2:08 PM in response to gebseng2

I'm curious which data in other cloud based Apple services can be deleted so easily, and not be restored from Time Machine backups...

Kind of a loaded question.


If you keep in mind the design of all iCloud services, you should be fine. iCloud is not a backup service, in that you go back to a certain point in time like Time Machine does. It is a syncing service, which keeps content the same across subscribed devices.


It does this in pretty much real time.


There are some locally cached files with iCloud Drive where you can actually use Time Machine to retrieve them. In other words, the local files are removed when you remove them from either iCloud or a subscribed device like an iPhone. Now you can go back to the last Time Machine backup and retrieve that folder or any file in it. If you don't mind digging, I hear you can do the same for Notes databases, Contacts etc, as they are all held locally as well. Photos is a variable, and depends on where you store your original files.


So, as I suggest, if you do not consider iCloud as a backup, you should be fine. It is a tool of convenience more than anything. And a good one IMO.


May 22, 2020 2:17 PM in response to LACAllen

Very loaded indeed! I don't consider iCloud as a backup service, but I do consider Time Machine as one. It's not quite clear to me why the Apple Music tracks I had added earlier can't be re-added to the Music library after a restore of "Music Library.musiclibrary", since the info is clearly in there. I get you point about Photos being similar, but to me the difference is that all the photos in there were created by me. On the other hand, the music tracks are still existing in Apple Music, I just need the system to tell me which ones I had imported earlier.

May 24, 2020 6:19 AM in response to gebseng2

Hi again, here is a style sheet that I could use to transform the content of Music Library.musiclibrary to a readable HTML file (via Saxon). I was also able to transform an older iTunes-Music-Library.xml the same way.


It looks like I now have a list of the music I lost. Next will be trying to find/write an AppleScript that could automatically download the tracks listed in the XML or HTML file.

How To Restore Music Library from Backup

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.