Syncing My Music Collection

My music library is massive. iTunes tells me that I could play music non-stop for 7.2 days without repeating anything. I used to have trouble thinking of what to listen to without playing the same tracks over and over. That is in those dark, dark days before Genius Mixes. Well that is all well and good for when I am at my computer but it doesn’t help me much if I want to play something on my 4 billion watt sound system which is connected to my media PC.

Where’s this all going, you might ask?

Well I have been thinking for a while about a way to sync my music collection to the media PC but I was having trouble coming up with a plan of action. You see, my media PC is connected to my home network wirelessly, so I didn’t want to sync all of my music. Only the best of the best of the best.

I’ve know about rsync for a while but I mistakenly thought it was just a basic mirroring tool. After doing a bit of research I came up with what I feel is the perfect syncing command for my requirements.

rsync --bwlimit=800
      --size-only
      --delete
      --delete-excluded
      --progress
      --exclude-from MusicBlacklist
      -vaz
      /mnt/MUSIC_SHARE_MOUNT_POINT/ /LOCAL/MUSIC/DIR/

The MusicBlacklist file contains a whole lot of paths and files that I don’t want to copy over. And since I am using the –delete-excluded argument, anything I add to the file that has already been copied over will be deleted.

At the moment it is still in the testing and fine-tuning stage. When I am confident with the integrity of the mirroring I will set it up to run in a periodic cron job and remove the -v and –progress arguments for obvious reasons.

Leave a comment

Your email address will not be published.