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.

xml vs itl

I am moving my itunes library from an old laptop to a new one. I have been religiously saving my xml files once a week as an apple employee told me some years ago. However, it seems I need up to date itl files also. But how do I save itl files?

Windows, Windows 10

Posted on May 15, 2020 4:23 AM

Reply
Question marked as Top-ranking reply

Posted on May 15, 2020 6:56 AM

You were given misleading information - the iTunes Library.itl file is your iTunes library database, and the corresponding XML is just a partial duplicate of it, in an open format, that exists primarily to enable access to iTunes data for third-party applications. The XML version may be useful in some cases where you need to recover a library after the iTunes Library.itl file is deleted or corrupted.


You don't need to do anything special to save the iTunes Library.itl file - it is continuously updated by iTunes while running, and by default in your C:\Users\<usernname>\Music\iTunes folder. Assuming you have your library in the standard "portable" or "well-formed" structure, with your media folders all contained in the same parent folder as the library, you should be backing up the whole folder as often as you feel necessary. Even in these days of widely available cloud storage, backing up to an external (USB) hard drive is the best option, especially if your library is of significant size.


Example: this is my main iTunes library (which is actually on a 2TB external drive, but would have the same shape if it was in the default location):


  1. This the iTunes Library.itl file - you may need to adjust Windows settings if you don't see the ".itl" extension
  2. iTunes Media in standard format - so all my media files are in its subfolders
  3. The XML representation of the library database
  4. Note that the .itl and .xml files are updated in parallel; however, the iTunes Library.itl is the important one - if you were to delete this iTunes will no longer be able to find and play your music, you'll have no playlists, play counts, etc. You can delete the .xml file without issues - iTunes will always recreate it on startup. There is an option in iTunes to turn off creation of the .xml file, so this need not even be present.


A backup is then simply a duplicate, on another device, of this whole structure. You can, of course, use proprietary backup tools for this though that then locks you into that solution if you need to recover your data. A more common approach is to use a tool that incrementally synchronizes your library with a copy of it on another device - you need to do this when iTunes is not running. Many people use Microsoft's SyncToy utility for this - I happen to use an alternative ("FreeFileSynch") but the principle is the same. I typically run this every couple of days, and actually update two copies of the library - once to a portable USB drive and once across my local network to an external drive that's on a secondary system. The key idea here is that once you've created an initial duplicate of your library the "backup" process will only process files and folders that have changed; so for my library (total size just under 1TB) the routine sync procedure will copy just a few hundred files and take no more than a couple of minutes.


With this approach the external duplicate of your library is intermediate storage when moving to a new PC. So, if I want to move by library to another system, I'd just copy the whole library from my portable USB drive to the new machine, and use the Shift-Start method to select the iTunes Library on the new system if not placed in the default location.

8 replies
Question marked as Top-ranking reply

May 15, 2020 6:56 AM in response to jsmiley108

You were given misleading information - the iTunes Library.itl file is your iTunes library database, and the corresponding XML is just a partial duplicate of it, in an open format, that exists primarily to enable access to iTunes data for third-party applications. The XML version may be useful in some cases where you need to recover a library after the iTunes Library.itl file is deleted or corrupted.


You don't need to do anything special to save the iTunes Library.itl file - it is continuously updated by iTunes while running, and by default in your C:\Users\<usernname>\Music\iTunes folder. Assuming you have your library in the standard "portable" or "well-formed" structure, with your media folders all contained in the same parent folder as the library, you should be backing up the whole folder as often as you feel necessary. Even in these days of widely available cloud storage, backing up to an external (USB) hard drive is the best option, especially if your library is of significant size.


Example: this is my main iTunes library (which is actually on a 2TB external drive, but would have the same shape if it was in the default location):


  1. This the iTunes Library.itl file - you may need to adjust Windows settings if you don't see the ".itl" extension
  2. iTunes Media in standard format - so all my media files are in its subfolders
  3. The XML representation of the library database
  4. Note that the .itl and .xml files are updated in parallel; however, the iTunes Library.itl is the important one - if you were to delete this iTunes will no longer be able to find and play your music, you'll have no playlists, play counts, etc. You can delete the .xml file without issues - iTunes will always recreate it on startup. There is an option in iTunes to turn off creation of the .xml file, so this need not even be present.


A backup is then simply a duplicate, on another device, of this whole structure. You can, of course, use proprietary backup tools for this though that then locks you into that solution if you need to recover your data. A more common approach is to use a tool that incrementally synchronizes your library with a copy of it on another device - you need to do this when iTunes is not running. Many people use Microsoft's SyncToy utility for this - I happen to use an alternative ("FreeFileSynch") but the principle is the same. I typically run this every couple of days, and actually update two copies of the library - once to a portable USB drive and once across my local network to an external drive that's on a secondary system. The key idea here is that once you've created an initial duplicate of your library the "backup" process will only process files and folders that have changed; so for my library (total size just under 1TB) the routine sync procedure will copy just a few hundred files and take no more than a couple of minutes.


With this approach the external duplicate of your library is intermediate storage when moving to a new PC. So, if I want to move by library to another system, I'd just copy the whole library from my portable USB drive to the new machine, and use the Shift-Start method to select the iTunes Library on the new system if not placed in the default location.

May 16, 2020 12:08 PM in response to jsmiley108

See Move your iTunes library to a new computer - Apple Community for more on moving a library to a new computer. Key is either to use a portable shape for the library or replicate the absolute paths on the new system to match the old.


See Empty/corrupt iTunes library after upgrade/crash - Apple Community for details on broken libraries. Where the .itl has been lost and no suitable file is found in the Previous iTunes Libraries folder there may be a hidden .tmp file that can be used to restore the .itl.


tt2

May 16, 2020 5:01 AM in response to hhgttg27

Thank you for your assistance. In my experience over the years, I find that Apple employees give me good/reliable/useful information about 1/5th of the time.


I have an external HD attached to my Desktop that contains 3.72 TB of music files. iTunes crashed on this computer in May 2019. I sought advice from Apple to fix this problem but I needed to find an up to date itl file to update/recreate my iTunes library and the only one I could find was dated 14th Sep 2018. The most recent xml file was 30th May 2019. I did not seem to be able to copy the subfolders and ratings so I ended up giving up on this until I found another solution. I then started using my laptop as my main source of music.


My current setup with my laptop is:

All files in the"music" folder.

604 GB of files in various folders inside "music" including 167 GB inside the "iTunes" folder which also has the up to date itl and xml files.


Can you head me in the right direction for how to setup iTunes in my new laptop, with all the subfolders, ratings etc retained? Is there an apple document that will properly talk me through this? I have a few different ones but want to make sure I do it the right way.


Just a couple of points:


General Preferences:

The following is ticked:

  • List view checkboxes
  • Grid view download badges
  • Automatically retrieve CD track names from the internet
  • I notice "star ratings" is not ticked. Not sure why?


Advanced Preferences:

iTunes Media folder location: C:\Users\my name\Music\iTunes\iTunes Media

The following is ticked:

  • Keep iTunes Media folder organized
  • Share iTunes Library XML with other applications
  • Enable full keyboard navigation
  • Check for new software updates automatically
  • Send diagnostic & usage data to Apple

May 16, 2020 9:50 AM in response to jsmiley108

First thing to check and report on: from your description it seems that you may have a split library, with the library and supporting files on the C: drive and your media on an external drive? Is this correct? This has always (in my opinion, at least) been a sub-optimal configuration - and especially so for recent iTunes builds that have been reported to fail in persisting any non-standard location information for the iTunes Media folder.


Second, what folder did you find the XML file from 2019 in? Can you create and post a screenshot from File Explorer to show everything else that's in the same folder? Although I've rarely seen it, it is possible that if iTunes crashes while updating the library file, the latter might not survive the crash. There may, however, be other files that can be used - hence the request to see a listing of everything there before moving onto further recommendations.


Lastly, just gathering additional information, what is the folder structure on your external drive - is all your media collected within a common parent folder, or is it distributed across several folders on the disk?

May 16, 2020 10:27 AM in response to hhgttg27

For the time being, would you mind ignoring my second paragraph which relates to my desktop, and just help me get the new laptop setup. Then I will answer your questions on the larger set of files. I very much appreciate your help.


One question that I do have: A number of guides/sets of instructions advise to consolidate the files first into the media folder before copying to a new device. Is this vitally important, because I would prefer to leave everything where it is (some files in the iTunes media folder and the rest just placed in other folders within the "music" folder on my original laptop)?

May 18, 2020 6:30 AM in response to turingtest2

So, I have moved my playlists/ratings okay - everything shows up in the right place (I had an initial thrill that everything is going alright).


All the files are also in the right place - however, they all have explanation marks next to them.

I dumped all the music folders/files into iTunes also so there are duplicates (and sometimes triplicates) of these music files, but they only appear in the initial folder and have no star ratings.


Is it because I didn't consolidate my files before I moved them from the old computer?


Do I need to delete everything and start again?


JS

xml vs itl

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