I have two Macs, and I use iTunes on both of them. My music library is managed on my MacBook, but I want access to all of the music on my Mac Pro at home without having to stream it. What’s the easiest way to keep these synchronized? We’re dealing with a Unix, so rsync comes to the rescue:
- Please back up your music, in case you get the hosts swapped or something. Tar it up or something:
tar -zcvf myMusic.tar.gz Music
- Make sure one computer is available to the other via SSH by enabling “Remote Login” under System Preferences/Sharing. Grab a terminal and test this:
- Also in the terminal, in your home directory, try a test run of rsync. I am transferring files from my laptop to my desktop, from a terminal on the desktop, so the command is:
Shell123rsync --archive --verbose --rsh=ssh --progress--log-file=anyNameYouLike.log --dry-runmy-macbook.local:Music/iTunes .
- Add additional -v flags to get more verbose output. Run until you feel comfortable. Take off the
--dry-runand sit back.
- Lastly, go select “File/Add to Library…” in iTunes and select your Music/iTunes directory. It’ll churn through the files and update its local database.
Turns out, these days I hardly ever rsync between two Macs; I buy music and rip CDs into my laptop, and I have a Sonos system that accesses tunes via a shared drive attached to my network. I easily mount this drive share to my laptop, so it regularly shows up in /Volumes on my laptop. So, the rsync command line looks like I’m synchronizing two directories local to my laptop:
rsync --archive --verbose --stats "iTunes Music/" "/Volumes/NAS/iTunes Music/"