Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

elektrik

macrumors newbie
Original poster
Jan 26, 2011
7
5
Hi, I hope someone can help with this Music challenge.

I lost my Apple Music library but I have an iTunes library backup from late 2019. This was when my music files (about 75,000 music tracks) were stored on an external drive. The files are now on my Synology NAS. The library is on my iMac.

What I want to do: In the 2019 iTunes library, update the base file path from the old external drive to the NAS, then re-scan the main directory on the NAS for changes, so that "Recently Added" has everything new since 2019.

Now: When I open the 2019 library in Music, it converts/updates, but all the files are missing (of course). When I update the location of a file, it scans for more changes, but after a full day of scanning, there are duplicates of everything. All the album art is gone, too.

What I don't want to do: I could just create a new library from scratch, scanning everything on the NAS. But then I don't have the order in which I added albums (important to me) over the last few years.

Any suggestions for how to accomplish what I want, using Music or anything else? It's really striking how basic and unhelpful Music is, after all these years.

Thanks for the assistance,
E
 
  • Like
Reactions: stirfyrking2020

stirfyrking2020

macrumors newbie
Mar 5, 2023
2
0
Crazy timing. I am looking for the same fix. (also wiht a Synology). Will let you know if i come across anything.
 

stirfyrking2020

macrumors newbie
Mar 5, 2023
2
0
take a look at this suggestion from ChatGPT:

MY QUESTION:
is there a way to edit the catalogue file directly instead of doing this one playlist at a time?


CHATGPT RESPONSE:
It is possible to edit the catalog file directly to update the file paths for your music library in Apple Music. However, this process can be complex and potentially risky if not done carefully. It's recommended that you backup your music library before attempting any direct edits to the catalog file.
To edit the catalog file directly, you can follow these general steps:
  1. Close the Apple Music app.
  2. Locate the iTunes Library.itl file on your computer. This file contains the catalog information for your Apple Music library and is typically located in the Music folder on your computer.
  3. Open the iTunes Library.itl file in a text editor (such as Notepad on Windows or TextEdit on Mac).
  4. Use the Find function in your text editor to search for the old file path (MyMusic2) and replace it with the new file path (MyMusic100).
  5. Save the changes to the iTunes Library.itl file.
  6. Reopen the Apple Music app and wait for it to update the library with the new file paths.
Again, it's important to note that direct edits to the catalog file can be complex and potentially risky. It's always a good idea to backup your music library before making any changes, and it may be safer to update your playlists individually within the Apple Music app as described in my previous response.

Hope this helps. I will attemtp the procedure later this week.
 

elektrik

macrumors newbie
Original poster
Jan 26, 2011
7
5
take a look at this suggestion from ChatGPT:

MY QUESTION:
is there a way to edit the catalogue file directly instead of doing this one playlist at a time?


CHATGPT RESPONSE:
It is possible to edit the catalog file directly to update the file paths for your music library in Apple Music. However, this process can be complex and potentially risky if not done carefully. It's recommended that you backup your music library before attempting any direct edits to the catalog file.
To edit the catalog file directly, you can follow these general steps:
  1. Close the Apple Music app.
  2. Locate the iTunes Library.itl file on your computer. This file contains the catalog information for your Apple Music library and is typically located in the Music folder on your computer.
  3. Open the iTunes Library.itl file in a text editor (such as Notepad on Windows or TextEdit on Mac).
  4. Use the Find function in your text editor to search for the old file path (MyMusic2) and replace it with the new file path (MyMusic100).
  5. Save the changes to the iTunes Library.itl file.
  6. Reopen the Apple Music app and wait for it to update the library with the new file paths.
Again, it's important to note that direct edits to the catalog file can be complex and potentially risky. It's always a good idea to backup your music library before making any changes, and it may be safer to update your playlists individually within the Apple Music app as described in my previous response.

Hope this helps. I will attemtp the procedure later this week.
Thanks for posting and thinking of this.

When I open the .itl in TextEdit, it's not usable:

Screenshot 2023-03-05 at 9.24.44 PM.png


When I open the iTunes Music Library.xml, it can be read and has a location for each music file. Example:

<key>Location</key><string>file:///Users/*username*/old path*/A%20Tribe%20Called%20Quest/1991%20-%20The%20Low%20End%20Theory/01%20-%20A%20Tribe%20Called%20Quest%20-%20The%20Low%20End%20Theory%20-%20Excursions.mp3</string>

I did a Find & Replace, using the updated path to my NAS:

<key>Location</key><string>smb://*MySynologyName*/music/A%20Tribe%20Called%20Quest/1991%20-%20The%20Low%20End%20Theory/01%20-%20A%20Tribe%20Called%20Quest%20-%20The%20Low%20End%20Theory%20-%20Excursions.mp3</string>

Saved that file, created a new Music library, then File -> Library -> Import Playlist (File -> Import did nothing when I selected the updated xml file). It looks like imported everything, but it says the entire library was added today, and when I select a file, it doesn't play. Lost all the album artwork, too. So that's not the answer....I don't think?

Back to the drawing board...
 

chinopozo

macrumors newbie
Dec 30, 2023
9
1
Just came across this and found a solution, so thought I would share.

Assuming you do not use the "keep library arranged" checkbox, and the library just needs its base path changed:

1. close Music
2. the old/existing library location (if the music is still in place there), rename the based folder so Music won't find it and will see everything as missing.
3. open Music. Double click one song in the library (that will now be missing), click "Locate" and point it to the new location you have copied/moved the library to (the new disk etc)
4. it will ask you "Find others based on this?" click yes
5. Music will go through every song in the library to check if it's missing, then reassign it based on the parent directory structure of the song you clicked
6. for me it found about 80% on the first run, for some reason. Then I repeated the same with one of the 20% with the "missing icon" and it ran through and found every song on the second go

The above assumes you have copied the library already to a new disk or location, and the overall Artist > Album > Song directory structure hasn't changed (directories above Artist level don't matter, mine didn't match on the new location)

Hope this helps and you were actually trying to do the same as me. Basically Music rewrites the base path itself using the "Locate" feature (I'd bet the developers added this feature for exactly this use case, moving libraries about to new discs)
 

OldCorpse

macrumors 68000
Dec 7, 2005
1,758
347
compost heap
Thank you chinopozo for updating Music/iTunes/Library solutions. Many of us have all sorts of issues with these, because so many need to make transitions from external volumes with music files to migrate to newer macs and all kinds of issues come up. I myself have had issues (which I described and solved in a thread on the Audio section of MR), and I'm always on the lookout for folks dealing with this.
 

woodenbrain

macrumors member
Sep 2, 2009
80
9
for me it found about 80% on the first run, for some reason. Then I repeated the same with one of the 20% with the "missing icon" and it ran through and found every song on the second go
So as I just wrote here, this whole problem has kept me from buying a new Mac for years. Apple must figure out a way to deal with this problem! People need to move media files around, it's absurd there is no way to point iTunes at new paths (and multiple paths, not just one). Everything that was HERE is now HERE, and so forth as many times as needed.

Anyway -- I am in the process of doing as you described now. I have a 2TB MP3 library and iTunes (on Mojave) has been spinning now for 16 hours+. No sign of what it is doing other than Activity Monitor which is showing 38-42 open threads and occasionally showing as unresponsive but then waking back up.

How long did your "first run" take? How large is your library? Thank you.
 

chinopozo

macrumors newbie
Dec 30, 2023
9
1
Yeah couldn't agree more, and can't help but think it would have been addressed properly long ago, as an exposed option for "power users" if everything didn't switch to "just buy our subscription and stream everything".

My library is much smaller, 18,000 songs, 150 GB. From memory it took maybe a few hours to do the first 80%, I think I left it unattended but it could have been anywhere between 1 - 6 hours, my memory is fuzzy there. The second run that found the 20% remaining was much faster, under an hour, I think more like half an hour.

Biggest factor might be the disk though. My connection is to a NAS over 1Gb ethernet, but it's actually quite speedy for small read/write operations like searching through folders, which I guess is all it was doing. And library file itself for writing all local to the SSD, that's not stored on NAS.

16+ hours is a bit crazy. Does it allow you to quit in the normal way, without a Force Quit? If it does I'd restart Music and see if it picks up and does better on the second run. Not sure if I'd want to Force Quit, though my guess is worst case they'll all be "?" and you can click one to restart the process. Maybe would try making a copy of the Music lib/XML etc files before force quit.

Since writing that post I'm on the look out for a different music client altogether. something that ONLY does local music, no tie to any streaming service, which hopefully would mean it's reliable for that dedicated purpose. Not looked into enough to find something yet, though.
 

chinopozo

macrumors newbie
Dec 30, 2023
9
1
So as I just wrote here, this whole problem has kept me from buying a new Mac for years. Apple must figure out a way to deal with this problem! People need to move media files around, it's absurd there is no way to point iTunes at new paths (and multiple paths, not just one). Everything that was HERE is now HERE, and so forth as many times as needed.

Anyway -- I am in the process of doing as you described now. I have a 2TB MP3 library and iTunes (on Mojave) has been spinning now for 16 hours+. No sign of what it is doing other than Activity Monitor which is showing 38-42 open threads and occasionally showing as unresponsive but then waking back up.

How long did your "first run" take? How large is your library? Thank you.
reply above ^
 

woodenbrain

macrumors member
Sep 2, 2009
80
9
16+ hours is a bit crazy. Does it allow you to quit in the normal way, without a Force Quit? If it does I'd restart Music and see if it picks up and does better on the second run. Not sure if I'd want to Force Quit, though my guess is worst case they'll all be "?" and you can click one to restart the process. Maybe would try making a copy of the Music lib/XML etc files before force quit.
You've no idea. At the rate it's going, it's going to be a month. Granted, this is running on an old Mac (CPU upgraded 2009 MacPro); the files are now on the NAS. But the library file is on a directly-attached HDD. iTunes beachballs, but usually it's making progress. I can tell by the mod date of the .xml and .itl file. Every day I've been making a copy of the .xml file to check progress. so far after what, a week, it's 1/8 done. So 2 months?
 

chinopozo

macrumors newbie
Dec 30, 2023
9
1
****, yeah that's crazy. I can only guess it's nothing CPU related and a network bandwidth issue (I am on an M1 mac), or a "small read and write operations" bottleneck. I don't think it will be able to run that long, in any case, unless they're doing good RAM management. I'd quit the process and try again, or another route. Good luck! Like you say, this should be a simple feature built in.

You've no idea. At the rate it's going, it's going to be a month. Granted, this is running on an old Mac (CPU upgraded 2009 MacPro); the files are now on the NAS. But the library file is on a directly-attached HDD. iTunes beachballs, but usually it's making progress. I can tell by the mod date of the .xml and .itl file. Every day I've been making a copy of the .xml file to check progress. so far after what, a week, it's 1/8 done. So 2 months?
 

chinopozo

macrumors newbie
Dec 30, 2023
9
1
Thank you chinopozo for updating Music/iTunes/Library solutions. Many of us have all sorts of issues with these, because so many need to make transitions from external volumes with music files to migrate to newer macs and all kinds of issues come up. I myself have had issues (which I described and solved in a thread on the Audio section of MR), and I'm always on the lookout for folks dealing with this.

No problem! (just seen this) It's crazy there are not better solutions for this. I did speak with someone who manages their offline music collection through VLC today, and am going to look into that. Basically I think the real solution is to switch to a client dedicated to offline music collections.
 

chinopozo

macrumors newbie
Dec 30, 2023
9
1
Just to update here with something I found, as I have (again) had to do the same and move my music library from a NAS to an HDD (to get free backups via Backblaze, basically, and also eliminate the LAN to solve issues related to router) and I stumbled across a solution that let me do it in seconds.

What I found recently while doing loads of "trying to fix my damn music library" tasks over the last week is Music.app will update the "lost" status, or try to find songs, specifically when you add them to a playlist. When you try to add them to a list, it goes through every track and checks the location is there.

So if you move one album and just want to update that, make sure their old location is no longer available, select all, and try to add to a playlist. It will update all with the "lost" status then you can click one, Locate, and click "Find others". This is useful because it allows moving music in batches, basically — so you can do 1000 or 5000 at a time to make things more manageable.

And, the pretty amazing thing I just found that I came here to post. This won't work for all, but I highly recommend putting your music in a VOLUME called "Music" (or something that would always make sense to hold your audio collection, and nothing else). Inside the volume goes whatever folder structure you want and could be used over time. This is what I accidentally did, and it allows me to move 20,000 songs from NAS to HDD in about 5 minutes (it updated in seconds, it just take a few mins to check it actually did update).

Old path (NAS share) was "/music/Music/<artist folders here>/"

New path (new volume I made on HDD using Disk Utility) was "/MUSIC/Music/<artist folders here>/"

I moved everything to HDD, disconnected the NAS, selected about 5000 songs in Music.app, put them in a playlist, and clicked the first expecting it to ask me to Locate. Instead it just played, and all 5000 songs were updated (after a pause of about 10 seconds) to say "/MUSIC/" (caps, the new location on HDD).

Checked my library Songs view, other songs outside the 5000 added to list still said "/music/" via Get Info.

I repeated the same 4 times in batches of 5000, and they all updated literally the instant I dragged them into a new playlist. All say "MUSIC" now and it's all working perfectly.

Basically my takeaway is if you store your collection on an external device, create a Volume (with Disk Utility) on that device so it mounts to "/MUSIC" or whatever at the root level, with a predictable dir structure inside you won't want to change in the future.

The advantage is you can move your library in seconds to any future device (new NAS, new HDD, SSD, etc — you could probably even make a local volume as a partition of a mac's internal storage, though I've not done that before).

Anyway, hope that helps someone!
 

chinopozo

macrumors newbie
Dec 30, 2023
9
1
OK one more thing I just noticed!

If you store the music on an AFPS formatted volume, it APPEARS (test yourself carefully) that Music.app can just follow your music around without having to "Locate" when you change the folder structures.

I've noticed this a few times now, so if you re-organise or rename an album folder or track (not within Music.app, directly on the volume) Music.app knows what you did, and just updates the path without you telling it.

It definitely didn't do this on the NAS share, which was not formatted as AFPS.
 

woodenbrain

macrumors member
Sep 2, 2009
80
9
Just to update here with something I found, as I have (again) had to do the same and move my music library from a NAS to an HDD (to get free backups via Backblaze, basically, and also eliminate the LAN to solve issues related to router) and I stumbled across a solution that let me do it in seconds.

What I found recently while doing loads of "trying to fix my damn music library" tasks over the last week is Music.app will update the "lost" status, or try to find songs, specifically when you add them to a playlist. When you try to add them to a list, it goes through every track and checks the location is there.

So if you move one album and just want to update that, make sure their old location is no longer available, select all, and try to add to a playlist. It will update all with the "lost" status then you can click one, Locate, and click "Find others". This is useful because it allows moving music in batches, basically — so you can do 1000 or 5000 at a time to make things more manageable.

And, the pretty amazing thing I just found that I came here to post. This won't work for all, but I highly recommend putting your music in a VOLUME called "Music" (or something that would always make sense to hold your audio collection, and nothing else). Inside the volume goes whatever folder structure you want and could be used over time. This is what I accidentally did, and it allows me to move 20,000 songs from NAS to HDD in about 5 minutes (it updated in seconds, it just take a few mins to check it actually did update).

Old path (NAS share) was "/music/Music/<artist folders here>/"

New path (new volume I made on HDD using Disk Utility) was "/MUSIC/Music/<artist folders here>/"

I moved everything to HDD, disconnected the NAS, selected about 5000 songs in Music.app, put them in a playlist, and clicked the first expecting it to ask me to Locate. Instead it just played, and all 5000 songs were updated (after a pause of about 10 seconds) to say "/MUSIC/" (caps, the new location on HDD).

Checked my library Songs view, other songs outside the 5000 added to list still said "/music/" via Get Info.

I repeated the same 4 times in batches of 5000, and they all updated literally the instant I dragged them into a new playlist. All say "MUSIC" now and it's all working perfectly.

Basically my takeaway is if you store your collection on an external device, create a Volume (with Disk Utility) on that device so it mounts to "/MUSIC" or whatever at the root level, with a predictable dir structure inside you won't want to change in the future.

The advantage is you can move your library in seconds to any future device (new NAS, new HDD, SSD, etc — you could probably even make a local volume as a partition of a mac's internal storage, though I've not done that before).

Anyway, hope that helps someone!
Thanks for taking your time with the update. Unfortunately your methods either didn't work or would be hard for me to experiment with. Maybe it's a difference with iTunes and Music. I'm still trying to get everything in order in iTunes on that old MacPro that's now dedicated to this task and headless.

Dragging dead tracks to a new playlists simply doesn't put those tracks on that playlist, just live ones. In fact that's a way to identify dead tracks in iTunes. You're saying in Music doing that actually puts the dead tracks on a user playlist? (May be a reason to try to migrate to Music now.)

Th option to have a volume called Music isn't viable now cuz I'm "already" 30% thru where they sit now, after 3 weeks and many hangs and lost days.

However, that's almost surely not what did the trick. Your paths from NAS to HDD are identical. So it should "just work". I don't think it's case sensitive. As long as you keep the same exact paths it should be no problem. I could not do this because my music was spread over about 5 HDD volumes and that was unwieldy.

In fact -- it's been suggested to make a symlink for all the old volumes and keep those in the /Volumes directory. That's also messy.

I'll never change my volume structure again. Well.

Also, what you discovered about the AFPS volume is the same for HFS. I did it all the time when I had it all on HDDs. Too bad it seems that's not going to work with the NAS. Not even to the point I can discover that is also broke. :)
 

chinopozo

macrumors newbie
Dec 30, 2023
9
1
Thanks for taking your time with the update. Unfortunately your methods either didn't work or would be hard for me to experiment with. Maybe it's a difference with iTunes and Music. I'm still trying to get everything in order in iTunes on that old MacPro that's now dedicated to this task and headless.

Dragging dead tracks to a new playlists simply doesn't put those tracks on that playlist, just live ones. In fact that's a way to identify dead tracks in iTunes. You're saying in Music doing that actually puts the dead tracks on a user playlist? (May be a reason to try to migrate to Music now.)

Th option to have a volume called Music isn't viable now cuz I'm "already" 30% thru where they sit now, after 3 weeks and many hangs and lost days.

However, that's almost surely not what did the trick. Your paths from NAS to HDD are identical. So it should "just work". I don't think it's case sensitive. As long as you keep the same exact paths it should be no problem. I could not do this because my music was spread over about 5 HDD volumes and that was unwieldy.

In fact -- it's been suggested to make a symlink for all the old volumes and keep those in the /Volumes directory. That's also messy.

I'll never change my volume structure again. Well.

Also, what you discovered about the AFPS volume is the same for HFS. I did it all the time when I had it all on HDDs. Too bad it seems that's not going to work with the NAS. Not even to the point I can discover that is also broke. :)

No problem. Good to hear that you've at least been able to offload to a dedicated mac.

I was just confirming the point you mention, that it's a way to identify dead tracks, by *trying* to add them to a playlist (it doesn't add them in Music either, but prompts a status update with the "!" icon which allows clicking and re-locating). I was suggesting to use this to relocate songs batches rather than all at once, which seemed safer to me when I did it a second time.

The paths do seem to be case-insensitive, so yeah same path and it will just work. It does do *something* to check the path as it used to say "/music/" in Get Info but after going through each batch, it updated them to "/MUSIC/", so it does connect them to the specific volume and updates the path references (with no need to relocate/click "find others").

Any way, hopefully with the various things we've found on this thread it will help others doing similar in the future. For me putting the music library in a dedicated volume for music at the root level seems the best way to "play nice" with iTunes/Music and allow simple transfers to new storage devices in the future, for use cases where that's practical.

Interesting about HFS! I wasn't aware of iTunes/Music being able to do that if you change a path or rename while on the same device. My NAS share was ext4, btw. My guess is any non-mac file systems will behave the same (it must be storing dynamic file references when it's a mac file system, which is likely also why we can't just open an XML file and search/replace paths to move library locations in an instant).

Still hoping someone will make an open-source style music client app that reproduces all the core functionality and basic library management experience, local music only, cross platform, proper power user features with no streaming services. Seems like a massive hole in the market. I'd pay a fair price, or reasonably low annual cost, for that if it was done well and completely reliable. But, in the end you can basically get there with iTunes/Music, just feels like you're fighting it the whole time.
 

woodenbrain

macrumors member
Sep 2, 2009
80
9
I am thrilled to report success in this migration based on letting iTunes find all the missing files. I wanted to report a few things I've learned, either summarizing what's already been said or adding some new info.

This is for a scenario like mine where I manually organized my music files over several HDDs and added them to iTunes where they sat. I did not have either "keep organized" or "copy files to library" enabled in iTunes. I was able to keep the old computer for the dedicated task of looking for the new locations. (I ran it headless and viewed progress via VNC).

• move all files to new location with highest-level folders possible, and put them in a single folder on new volume. Ideally call folder "Media". In my case, on a Synology NAS, they are in /volumename/Audio/Media/. My top-level folders on each of the old drives were named "MP3s [Vol 1]" and so on, and organized by genre, then mostly by artist and album but not always. Important part is don't change the paths under those top level folders.

• change the iTunes Media folder location to that "Media" folder created above. Let it think a short while.

• quit iTunes and backup your .itl and .xml files.

• use CPUSetter to "renice" the iTunes process to -19 or -20 (highest CPU priority). Not sure how much that helped but can't hurt. Just change back afterwards (to 0) if still using the old Mac. Keep that and Activity Monitor open.

• start playing a track anywhere, and let iTunes locate missing files.

• (tip: get info on a track to see the file tab where iTunes thinks it is, to be able to quickly locate it yourself.)

At this point iTunes was very very slow --- processing <10,000 per day and sometimes locking up. (reported as "unresponsive" by Activity Monitor). Was very difficult to tell whether it was doing it's intended job or just choking.

• If it never becomes responsive, after a couple hours, it's probably toast and needs to be quit or force quit. An AppleScript like this may help iTunes quit cleanly and hopefully save its progress.

Code:
with timeout of 600000 seconds
tell application "iTunes" to quit
end timeout

• if force quit, might as well reboot Mac at this point to keep things greased.

• it did seem to retain its progress though even when force quit, maybe temporary files written somewhere else.

• monitor the modification dates of the .itl and .xml files.

• make a copy of the .xml file periodically and open in BBEdit. Search for /name-of-new-volume/ and "Find All". That should give you a count of processed tracks.

The breakthrough came when I did three things -- not sure which was most important but all probably helped:

• vigilantly cancel any stupid task iTunes is doing when you launch iTunes before clicking a missing track for iTunes to locate. Especially: Genius and Gapless Playback searching. (upper right in iTunes)

• turn off live updating on any particularly large smart playlist

• work exclusively off a playlist of missing (dead) tracks. Explained at that link but, briefly: 1: go to song view, select all tracks, drag them all to a blank playlist (called, say All-Tracks). Make smart playlist which all rules: playlist is not all-tracks and media kind is music. turn off live updating. update manually via context menu.

• after many hours it will come back with how many tracks it found. at this point it will update the .itl and .xml files. (it may other times, certainly will when quitting cleanly or relaunching).

• as you progress, rinse and repeat above, with tracks in different folders, etc.

now it was ripping though many tens of thousands of tracks a day. Completed the last two thirds in just a few days.

finally got them all.

• backup the resulting .xml and .itl files again.

• copy the .itl folder to the new mac.

• on the new mac, rename or move the default Music library file. or zip it.

• OPT-double click on the .itl file and save the converted "Music Library" file to ~/Music/Music/

and that's all!

wait who knows how long for it to re-load the artwork (barely a dent as I write this an hour later), as the artwork folder was not carried over (and wouldn't have been even if you copied it). See this excellent user tip for info on all the orphaned files.
 
Last edited:

chinopozo

macrumors newbie
Dec 30, 2023
9
1
I am thrilled to report success in this migration based on letting iTunes find all the missing files. I wanted to report a few things I've learned, either summarizing what's already been said or adding some new info.

This is for a scenario like mine where I manually organized my music files over several HDDs and added them to iTunes where they sat. I did not have either "keep organized" or "copy files to library" enabled in iTunes. I was able to keep the old computer for the dedicated task of looking for the new locations. (I ran it headless and viewed progress via VNC).

• move all files to new location with highest-level folders possible, and put them in a single folder on new volume. Ideally call folder "Media". In my case, on a Synology NAS, they are in /volumename/Audio/Media/. My top-level folders on each of the old drives were named "MP3s [Vol 1]" and so on, and organized by genre, then mostly by artist and album but not always. Important part is don't change the paths under those top level folders.

• change the iTunes Media folder location to that "Media" folder created above. Let it think a short while.

• quit iTunes and backup your .itl and .xml files.

• use CPUSetter to "renice" the iTunes process to -19 or -20 (highest CPU priority). Not sure how much that helped but can't hurt. Just change back afterwards (to 0) if still using the old Mac. Keep that and Activity Monitor open.

• start playing a track anywhere, and let iTunes locate missing files.

• (tip: get info on a track to see the file tab where iTunes thinks it is, to be able to quickly locate it yourself.)

At this point iTunes was very very slow --- processing <10,000 per day and sometimes locking up. (reported as "unresponsive" by Activity Monitor). Was very difficult to tell whether it was doing it's intended job or just choking.

• If it never becomes responsive, after a couple hours, it's probably toast and needs to be quit or force quit. An AppleScript like this may help iTunes quit cleanly and hopefully save its progress.

Code:
with timeout of 600000 seconds
tell application "iTunes" to quit
end timeout

• if force quit, might as well reboot Mac at this point to keep things greased.

• it did seem to retain its progress though even when force quit, maybe temporary files written somewhere else.

• monitor the modification dates of the .itl and .xml files.

• make a copy of the .xml file periodically and open in BBEdit. Search for /name-of-new-volume/ and "Find All". That should give you a count of processed tracks.

The breakthrough came when I did three things -- not sure which was most important but all probably helped:

• vigilantly cancel any stupid task iTunes is doing when you launch iTunes before clicking a missing track for iTunes to locate. Especially: Genius and Gapless Playback searching. (upper right in iTunes)

• turn off live updating on any particularly large smart playlist

• work exclusively off a playlist of missing (dead) tracks. Explained at that link but, briefly: 1: go to song view, select all tracks, drag them all to a blank playlist (called, say All-Tracks). Make smart playlist which all rules: playlist is not all-tracks and media kind is music. turn off live updating. update manually via context menu.

• after many hours it will come back with how many tracks it found. at this point it will update the .itl and .xml files. (it may other times, certainly will when quitting cleanly or relaunching).

• as you progress, rinse and repeat above, with tracks in different folders, etc.

now it was ripping though many tens of thousands of tracks a day. Completed the last two thirds in just a few days.

finally got them all.

• backup the resulting .xml and .itl files again.

• copy the .itl folder to the new mac.

• on the new mac, rename or move the default Music library file. or zip it.

• OPT-double click on the .itl file and save the converted "Music Library" file to ~/Music/Music/

and that's all!

wait who knows how long for it to re-load the artwork (barely a dent as I write this an hour later), as the artwork folder was not carried over (and wouldn't have been even if you copied it). See this excellent user tip for info on all the orphaned files.

Thrilled to hear @woodenbrain! Great summary, and example of getting into the weeds to make a solution that works. Feels old school mac in the best sense.

On the last point about artwork, after migration I decided to start embedding album artwork for most albums in the mp3s, so it's part of the data stored in my media directory in a way any player will see (rather than the way iTunes attaches artwork as library metadata). Comes with a big file size overhead (literally every track will add the size of the artwork), but this site is great for downloading artwork from iTunes: https://bendodson.com/projects/itunes-artwork-finder/ (and discogs.com tends to have decent artwork for more rare releases not on iTunes)
 
  • Like
Reactions: woodenbrain
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.