Relocate iTunes Library on my NAS - How?

Discussion in 'iTunes' started by BoDEAN, May 31, 2015.

  1. BoDEAN

    BoDEAN Member
    Bronze

    Joined:
    Apr 28, 2011
    Likes Received:
    0
    Right now, All my music is in /mp3 on my synology nas. I have Itunes on my pc organize all my music.



    However, I recently got a bose soundbar, and found that to play my music, it needs to be in the default /music folder on the nas to be seen and played. What is the easiest way to move my music from the /mp3 folder, to the music folder, and not mess anything up with itunes and my tags?
     
  2. Mathew Connelly

    Bronze

    Joined:
    Jul 13, 2011
    Likes Received:
    5
    There is a good guide on relocating your iTunes library to another drive from iLounge. I copy paste the contents of the user guide here directly.

    Moving Your Content to a New Hard Drive: The Wrong Way
    A very common mistake made by many users is to simply try and move their entire iTunes Media folder to a new location and update the iTunes Media folder path in iTunes’ preferences. In some cases this may work, but in reality you will risk iTunes losing track of some or all of your media files in the process.

    The reason for this is that iTunes stores the entire full path to each music file in its library database. If you move that file somewhere else, then iTunes won’t be able to find it, and the result will be a broken link to that file, shown as an exclamation mark in iTunes immediately to the left of the track listing:



    [​IMG]
    If you try to select a track with a broken link, iTunes will notify you that it cannot find the file, and provide an opportunity to locate it yourself:



    [​IMG]
    Selecting “Locate” will allow you to browse for the file, and iTunes will link the current entry to that specific file. This can be a viable solution for a few broken links, but you can imagine that this could become very tedious if you had hundreds or even thousands of files in this state.

    Should you find yourself in this situation, the simplest solution is usually just to move your iTunes Media folder back to its original location. iTunes still has the complete path to each file in its database, so if you put the actual files back, it should have no problem finding them again.

    Users who have a completely “Managed” library configuration may be able to get away with simply moving their media folder and updating the path, however it is still not the recommended solution unless you are absolutely certain that your library is fully managed and organized in the way that iTunes expects it to be. The reason this method will work in a fully managed library is because iTunes will look for any missing tracks in their default location under the iTunes Media folder path before deciding that the links are broken. So, if your tracks are organized in the way that iTunes expects to see them, then it will be able to find them in the new location. However the problem is that it is not uncommon for users with large libraries to have a few referenced files or files with non-standard names due to changes to iTunes preference settings or even inconsistent behaviour with older versions of iTunes.

    The “Consolidate Library” feature, discussed in the next section, will ensure that your library is fully managed and organized the way iTunes expects, but if you’re going to use this option anyway, you might as well let iTunes copy the files to the new location in the process and save yourself a step.

    Note: Mac OS X users can get away with moving their media files around on the same drive and iTunes will still be able to find them. This is not iTunes-specific but is actually due to the fact that the Mac OS X operating system itself keeps track of files when they’re moved to new locations on the same drive, regardless of file type. This will not work, however, when moving files to a different drive, partition, or computer.
    Consolidate: The Right Way
    So, knowing that these pitfalls exist, what’s the best way? Remember that iTunes’ philosophy of managing your media is actually to insulate you from having to worry about the underlying file system. On the basis of this approach, it makes sense that it should provide the necessary tools itself to facilitate moving your library to a new location.

    So in other words, rather than messing around copying/moving files through Finder or Windows Explorer, why not let iTunes deal with this for you? This is handled in iTunes through the Consolidate files option, found under File, Library, Organize Library in iTunes.

    What the Consolidate files option actually does it to gather all of the files listed in your iTunes library into the iTunes Media folder. It does this by copying any referenced files into the iTunes Media folder, renaming them with the proper track name, and organizing them into its standard file and folder structure. This option is at least partly intended to allow you to bring “referenced” files into the iTunes Media folder from various other locations in the event that you may have added them to your library with the “Copy Files” option disabled.

    However the only real distinction between a file that is “managed” and a file that is “referenced” is the actual iTunes Media folder path. Files in this folder are considered “managed” files and anything outside is a “referenced” file. So, if you change the location of the iTunes Media folder to a new path and then use the Consolidate files option, iTunes will happily copy all of these files into your new location, updating all of the file location information in the iTunes database in the process.

    Performing the Move
    To actually perform the move, start by going into your iTunes Advanced Preferences, and changing the iTunes Media folder path to whatever new location you want your iTunes media files to be stored in. This will usually be an external hard drive, but it can be any valid path, including a secondary hard drive or even a network share:



    [​IMG]
    Once you have updated the iTunes Media folder location, simply select File, Library, Organize Library… (in iTunes 8, this option was “Consolidate Library” and in iTunes 7 and prior, it was located on the “Advanced” menu):



    [​IMG]
    You will be presented with a dialog box with the option to consolidate files or reorganize them. Select “Consolidate files” and click OK.



    [​IMG]
    iTunes will begin the process of copying the files into their proper locations and updating these locations in the iTunes library database. Note that this process copies the tracks to the new location rather than moving them. Although the original tracks still exist, the iTunes library database is updated with the new location for each track, which makes the process difficult to undo unless you have kept a backup of your library database from prior to the consolidation. Making such a backup is certainly an option, although not normally required.

    The other important note is that this will reorganize your entire library file system into iTunes’ default way of laying it out (e.g. ARTIST\ALBUM\TRACK.MP3 in the case of music files). This may not be a desirable option for those who have their media file system laid out in their own organizational structure, or who use other third-party applications that expect media files to be organized a certain way. Unfortunately, if you’re in this situation, there really is no easy way to move your iTunes media content to a new location without creating a whole new iTunes library and reimporting all of your tracks into the new library from their new locations.

    Note: If you’ve upgraded to the new iTunes Media organization, your Mobile Applications and iPod Games folders will be copied into the iTunes Media folder as part of this process as well.
    Confirming and Cleaning Up
    Once this process has completed, you should be able to confirm that the files have been copied to the new location and that iTunes is referencing them properly from there simply by selecting a track and choosing File, Get Info. The “Summary” tab for the file properties will indicate the physical location of that track, which should reflect the new iTunes Media folder path.

    Since iTunes copies the media content rather than moving it, you will likely also want to delete your iTunes media files from their original locations to free up space.

    Note: Keep in mind that iTunes only moves content that is actually listed in the iTunes library database, which means any stray files that were lying around the iTunes Media folder won’t be copied to the new location. This should not be a concern unless you’re storing non-iTunes media content in your iTunes Media folder.
    Remember that this process only moves the iTunes content however. Your iTunes library database will still be located in its original location, likely on your primary hard drive in your Music folder, as described earlier. So while you can clean out the “iTunes Media” sub-folder from here once you’ve consolidated your library to another location, you should not touch any of the other files or folders in your main iTunes folder.

    Moving the Library Database
    If you’re simply interested in moving your files to a larger disk, there’s seldom any reason to worry about moving the library database, as it doesn’t normally take up a lot of storage space, and there are advantages to leaving this file on your local hard drive and simply storing the content on an external drive.

    That having been said, if you do want to move the library database to another location, this is certainly possible as well as long as you’re using iTunes 7 or later. This must be done separately from the process of moving the content described above, and you’re best to move the content first and then relocate the library database once you’ve confirmed that everything is still working properly.

    To do this, shut down iTunes, and copy your “iTunes” folder (under your “Music” or “My Music” folder) to the new location. Keep in mind that you may still have media content located in an “iTunes Media” sub-folder and you probably don’t want to waste time copying this content over if you’ve already consolidated it to another location, so you may want to exclude that one sub-folder.

    Once you have copied the “iTunes” folder, including the “iTunes Library.itl” and all related support files and folders, simply restart iTunes while holding down the SHIFT key (Windows) or OPT key (Mac) and you will be prompted to either create a new library or choose a location for an existing library:



    [​IMG]
    Simply click “Choose Library” and browse for the location where you copied the iTunes folder. iTunes will startup using that particular library database instead of the one from the original location. Once you have set this location iTunes will continue to use it unless you change it again using the same method.

    Moving the iTunes library database onto an external hard drive can be useful if you plan to move the external hard drive between multiple computers. It can also be useful to store it in a common area on a local computer for access by multiple user profiles, or even on a network share.

    One word of caution, however: The iTunes database is not designed for multi-user access. If you decide to place it on a network share or in a common directory on a standalone workstation, always make sure that you do not have more than one copy of iTunes running against it at a time, otherwise you will risk corrupting your iTunes database.
     
  3. chris

    chris Administrator
    Administrator

    Joined:
    Jun 10, 2006
    Likes Received:
    1,777
    I use a program called ChronoSync that will automatically sync music between my NAS and my Mac. I use Sonos to access that music. Works great.
     
  4. diverdown

    diverdown Contributor
    Silver

    Joined:
    Sep 12, 2007
    Likes Received:
    49
    I've sucessfully migrated my music, tv and movies to an external drive, but iTunes still defaults to keeping my mobile applications (iphone and ipad apps) on my c drive. Unfortunately for me those mobile apps are now over 300gb and killing my primary HD. This has become a very real problem.

    ~S
     
  5. Europa

    Europa Moderator
    Senior Moderator

    Joined:
    Dec 12, 2008
    Likes Received:
    5,467
    Why do you need them all on your computer? You can't have 300 GB worth of apps on your iPad or iPhone. Are many of these apps old ones that you no longer use? Why not delete the ones you no longer use and maybe even some of the bigger ones that you currently use from iTunes? It will take longer to set up your new phones every year or so and when you restore since you'll have to download them from the cloud, but you'll save space on your computer.
     
  6. bballrob

    bballrob Genius
    Gold

    Joined:
    Oct 11, 2009
    Likes Received:
    461
    Post #2 in this thread is worth it's weight in gold!!
     
  7. diverdown

    diverdown Contributor
    Silver

    Joined:
    Sep 12, 2007
    Likes Received:
    49
    I always keep the apps on my PC. This way if they removed from the app store for some reason I still have them.
    ~S
     
  8. Europa

    Europa Moderator
    Senior Moderator

    Joined:
    Dec 12, 2008
    Likes Received:
    5,467
    You can put the apps on a backup drive and then delete them in iTunes. Just place them back in iTunes if they get pulled. You'll save a ton of space on your primary HD this way.
     
  9. diverdown

    diverdown Contributor
    Silver

    Joined:
    Sep 12, 2007
    Likes Received:
    49
    That's a really good idea. Thanks Europa....
     

Share This Page