Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

simon lefisch

macrumors 65816
Original poster
Sep 29, 2014
1,002
251
Hey everyone,

I have my iTunes library stored locally on my MBP, and I also have a copy of all the media on my 2008 R2 server. Once I start adding more media to my local library, will rsync copy the newly added files to my server or will it try to copy the entire library over again?
 

I'm a ROb

macrumors member
Aug 14, 2007
70
3
Netherlands
Rsync should only copy the new files and the changed files.

Not sure, but I think iTunes changes to files every time you listen to them (to update the 'number of times played' and the 'last played at' fields).
 

simon lefisch

macrumors 65816
Original poster
Sep 29, 2014
1,002
251
Rsync should only copy the new files and the changed files.

Not sure, but I think iTunes changes to files every time you listen to them (to update the 'number of times played' and the 'last played at' fields).
But those changes would be made in the iTunes library file and not the actual media, correct?

If so then that's ok as I keep my iTunes library file sync'd elsewhere. I'm only backing up the media.
 
  • Like
Reactions: grahamperrin

grahamperrin

macrumors 601
Jun 8, 2007
4,942
644
But those changes would be made in the iTunes library file and not the actual media, correct? …

I assume so. Some file types may be associated with a mixture of metadata data and metadata, but in many (most?) cases the metadata is separate.

So (as you say), a library file.

Plus there may be changes to extended attributes of media files, but I don't know whether the iTunes interface uses those attributes.
 
Last edited:
  • Like
Reactions: simon lefisch

simon lefisch

macrumors 65816
Original poster
Sep 29, 2014
1,002
251
I assume so. Some file types may be associated with a mixture of metadata, but in many (most?) cases the metadata is separate.

So (as you say), a library file.

Plus there may be changes to extended attributes of media files, but I don't know whether the iTunes interface uses those attributes.
Gotcha.

So most likely (I'm 99.9% sure) all the playback data/favs/etc are stored in the iTunes library file, but if I change any of the ID3 metadata, that would change some of the file attributes so it would have to be re-sync'd. Most of the songs I have are MP3 and I know that info typically carries over with the media itself.
 

grahamperrin

macrumors 601
Jun 8, 2007
4,942
644
Glancing at http://id3.org/ an ID3 tag is "within … file" so if rsync (or whatever you use) does not handle deltas, the sync/backup will be of the file in its entirety.

Looking ahead, I guess that in 2017 there'll be APFS with macOS 10.13 SMB client support for deltas. It's too soon for me to guess whether your 2008 R2 server will lend itself to that combination.
 
  • Like
Reactions: simon lefisch

simon lefisch

macrumors 65816
Original poster
Sep 29, 2014
1,002
251
@grahamperrin I have created a batch script that will run rsync3 (grabbed the rsync file CCC since it is an updated version [3.0.6] and named it rsync3). When it runs, it seems like it is still transferring all the files, but I cannot be sure. This is the code I have:

Code:
rsync3 -rv --progress <source> <destination>

Is this code sufficient to run so it updates any new/modified files without transferring everything?

I did read thru the man but didn't really find anything specific to what I am looking for. Thanks for any help/explanation you can provide.
 

mfram

Contributor
Jan 23, 2010
1,223
289
San Diego, CA USA
Yes, that should do it. I use '-av' instead of '-rv'. It might not make a difference in your case.

Specifically, I use these commands to copy my iTunes library to a remote server over SSH.

In my case, I'm interested in my music being transferred. Not movies, etc. And my excludes file has stuff like the Podcasts directory.

Code:
rsync -av -e ssh --progress --delete --exclude-from=~/Documents/sync-itunes-excludes.dat ~/Music/iTunes/iTunes\ Music server:media/iTunes/
scp ~/Music/iTunes/iTunes\ Music\ Library.xml server:media/iTunes/

Code:
cat Documents/sync-itunes-excludes.dat 
iTunes Music/Podcasts/*
iTunes Music/Movies/*
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.