iMarc | Interactive Media Architects
  • Portfolio
  • Process
  • About
  • Communiqué
  • Contact
  • Support
  • Search

Using rsync to synchronize iTunes libraries

by Craig Ruksznis - April 2, 2008 / 5:24pm

As I was on my nth drag-and-drop transfer of my music collection on my work computer on to my external to bring home and listen to nights, it occurred to me that there may be a better solution. I had been deleting the music from my external and then transferring my entire collection to my external from my work computer: hello inefficiency. It dawned upon me to ask the developers about potential solutions, and thanks to help from Will and Jeff, I am now using rsync to keep my two collections synchronized.

rsync allows you to synchronize files from one directory to another. There are endless options, whether you want old files to be deleted, new files to be added, etc. The solution I found most effective for keeping my iTunes collection was run the following command:

rsync -av --delete ~/Music/iTunes/ /Volumes/External Drive/iTunes/

The first directory is the source directory, or where the music is coming from. The latter directory is the destination, or host, directory. The '-av' stands for two commands, 'a' and 'v'. The letter 'a' represents 'archive', which makes sure that all of the permissions in the new host directory (the latter of the two) recursively. 'v' stands for verbose, which outputs any action that is occurring so that I can keep tabs on the progress and check for errors. Adding the --delete ensures that any files I have deleted in the source directory will also be deleted in the host directory. Now to check to make sure that everything will transfer cleanly you can add '--dry-run' after '--delete'. I ran this first to check that everything will work correctly without actually moving any files.

Also, by synchronizing my entire iTunes folder I am able to synchronize the playlists, artwork, and iTunes preferences. When I run this music collection on another computer, I hold down the alt button while I start iTunes, and choose that iTunes folder. This will open up that library, not the library that it typically defaults to.

The first time this command runs it will copy everything over. Anytime it runs after that it performs the synchronization. Cheers —

More Articles Get the RSS Feed Post A Comment

3 Comments

by Errol Sayre   #
on April 2, 2008 / 8:20pm
I generally recommend syncOtunes because it actually manipulates the iTunes library files to merge disparate iTunes libraries that may have different ratings or whatnot...

http://homepage.mac.com/oligrob/syncOtunes/syncOtunes.html

Obviously rsync is a great option if you are willing to maintain a single master library but syncOtunes is the way to go if you want to try to keep ratings and other library settings to be the same across all your libraries.
by Peter   #
on April 3, 2008 / 9:12am
If you're using the Mac version of rsync, you should consider adding the -E switch to preserve Mac OS-specific file attributes.
by Craig Ruksznis   #
on April 4, 2008 / 10:17am
@Peter, good point, I will do that!
@Errol - This is a good idea if you want to customize your sync in terms of iTunes playlists! Since I am interested in an exactly replica from one library to another, I prefer using rsync.

Add A Comment

Statements and opinions expressed in this blog and any comments made are the private opinions of the respective poster, and, as such, iMarc LLC is neither responsible nor liable for such content.

iMarc

iMarc is a web development company in Newburyport, MA. This is our blog.
View all blogs or learn more about iMarc.

About the Author

Craig's Head Craig Ruksznis, Developer
I develop websites.

(please vote for me for the "Most generic response to what my job description is best described as" aka "The Red Stapler Award")
More blogs by Craig

Search Our Blog

Recent Communiqués

  • Using A Framework
  • for lack of nail
  • You're Not Crazy for Smiling at your Plant
  • Book Recommendation: Writing Tools
  • Redundancy: Good or Bad?
  • Making the Switch to Gmail
  • Character Removal
  • Subway Art
  • Using rsync to synchronize iTunes libraries
  • Enough is Enough.
  • Targeted Inspiration
  • Green Benefit, Good Cause
  • Dashes, Underscores, URLs, SEO and Humans
  • Newburyport Web Geek Meetup, Thursday March 20th
  • 01001110 01001001 01001110: The Revolution Continues

Popular Communiqués

  • How to Make Links
  • Using A Framework
  • for lack of nail
  • You're Not Crazy for Smiling at your Plant
  • Using rsync to synchronize iTunes libraries
  • Patrick, From My Perspective
  • Subway Art
  • Green Benefit, Good Cause

Recent Comments

  • Using A Framework

    By Will Bond: While definitely a one-sided article, it is good to look at both sides, and most of the internet…

  • Using A Framework

    By Nick: This is another one of those defining characteristics between Hobby Developers and Professional…

  • Using A Framework

    By Errol Sayre: My biggest pet peeve with frameworks is that the vast majority not only push a design pattern upon you,…

  • Using A Framework

    By Fred LeBlanc: While building that framework that I built, I went out of my way to not limit code as best as possible. I…

  • You're Not Crazy for Smiling at your Plant

    By Elyse Holladay: Watch out - that notebook looks like it'd bite your hand off!

RSS

RSS Icon Learn about RSS and get the feed for our blog.

About iMarc

  • We build custom web sites
  • In-house strategy, design, programming, hosting
  • In business since 1997
  • We’re located in Newburyport, MA
  • Call us at (978) 462-8848

© 2008 iMarc LLC, Contact Us

Links

  • Home
  • Portfolio
  • Client Support
  • Log In
  • (icon)RSS

Meet the Team

Will's Head Will Bond, Senior Technical Architect

I’m involved with pretty much anything computer related here at iMarc, from servers to coding and markup best practices. I’m also the unofficial resident open source advocate.

After work I spend time with my awesome wife and daughter in and around our home in beautiful Newbury, MA.

Learn More | Meet the Others