Terminal and rsync

This is what I want to retrieve. I'm creating an automator script that copies the Music folder from iTunes to mine Time Capsule. I've use the rsync command for that.

When I go to the terminal and type:

rsync -av --force --delete --size-only ~/Music/iTunes/"iTunes Music"/Music ~/Desktop/"iTunes Sync/" > ~/Documents/AutomatorLogs/iTunesMSync.log


Then this command is working. It's creating a copy from the Music folder of iTunes and place this on the Desktop in the folder iTunes Sync.
It's just what I want only the destination folder needs to be the Time Capsule.

To mount mine Time Capsule (HD is named Data) I go to the Finder menu and select 'Connect with server' then I typ:
afp://10.0.1.1/Data/iTunes Sync

The volume is mounted and I can read/write from the Finder to it. When I change mine command line to:

rsync -av --force --delete --size-only ~/Music/iTunes/"iTunes Music"/Music /Volumes/"iTunes Sync"/ > ~/Documents/AutomatorLogs/iTunesMSync.log


I'll get the following error:

rsync: recv_generator: mkdir "/Volumes/iTunes Sync/Music" failed: Permission denied (13)
* Skipping everything below this failed directory *
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-37.3/rsync/main.c(992) [sender=2.6.9]


Someone knows how to handle this?

MacBook Pro 2,66 GHz / iMac 2.4 GHz / Mac Mini (PPC), Mac OS X (10.6.2)

Posted on Jan 9, 2010 4:00 PM

Reply
3 replies

Jan 9, 2010 4:40 PM in response to Pwain

--one thing I see right away is that you are using a wrong path in the rsync command. it should be "/Volumes/Data/iTunes Sync/Music" not "/Volumes/iTunes Sync/Music".--
sorry, strike that. you are mounting "/Data/iTunes Sync" directly via afp. then your command is correct.
also, may I ask why you are creating your own backup solution for this task? plenty of good existing backup programs that will do this for you starting with the built-in Time Machine.

Message was edited by: V.K.

Jan 10, 2010 1:41 AM in response to V.K.

For backup solution I use indeed the Time Machine capabilities. But I have the Sonos sound system. For this music solution you always need to deliver the music through a computer or a NAS station.

Sonos isn't able to use to use the .sparsbundle of Time Machine. I manually copy the iTunes Music folder to the Time Capsule HD and this is working perfect. I wanted to create a script (with automator) that copies the files (check whether there are new one or files that need to be deleted). I thought the rsync command is the perfect way to do is. When I test everything on mine local HD then it's working. Only when the destination is the Time Capsule I get those permissions errors.

Although I can read and write to the destination with the Finder.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal and rsync

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.