The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - General (http://hintsforums.macworld.com/forumdisplay.php?f=16)
-   -   Rsync Error Code 23 Kills Script (http://hintsforums.macworld.com/showthread.php?t=88670)

SteveSalt 07-01-2009 10:39 AM

As a rank amateur in terminal, i kept getting the same errors for me, and this is what i did wrong: didn't like the space in the folder name "Open Projects":

rsync -a -vv ~/Documents/PROJECTS/Open Projects/ /Volumes/Orangecicle/Backup
...
rsync: link_stat "~/Documents/PROJECTS/Open" failed: No such file or directory

I had to rename the folder to "Open_Projects" and the errors stopped and synced.

timbloom 02-11-2010 01:18 PM

Quote:

Originally Posted by SteveSalt (Post 540583)
As a rank amateur in terminal, i kept getting the same errors for me, and this is what i did wrong: didn't like the space in the folder name "Open Projects":

rsync -a -vv ~/Documents/PROJECTS/Open Projects/ /Volumes/Orangecicle/Backup
...
rsync: link_stat "~/Documents/PROJECTS/Open" failed: No such file or directory

I had to rename the folder to "Open_Projects" and the errors stopped and synced.

Another solution to this would to be using an escape character "\" to this. Changing the folder name works too but in cases where that's not possible you would type "rsync -a -vv ~/Documents/PROJECTS/Open\ Projects/ /Volumes/Orangecicle/Backup

The \ character ahead of a space tells it to ignore it as a separator in the command or script so it will pass that space correctly into the rsync command.

acepelon 09-04-2010 04:51 PM

In case someone is still having troubles with this and comes across this thread, I thought that rsync escaped the same way that I am used to normal files escaping, so I put in as my source:

blah/iTunes\ Library/ etc, and that simply wouldn't work no matter what I did (I am running Snow Leopard btw). I even tried double quotes around the source- didn't make a difference. Finally I tried single quotes AND used, instead of backslash-escape, a single ? in place of the space like so:

blah/iTunes?Library

Worked like a charm. While working on this, I ran across a great posting here: http://forum.synology.com/enu/viewto...p?f=39&t=23124 that shows you how to log great information regarding your transfer. If you do this, you need to be familiar with scripting because there are some variables you will need to change and you will also want to single-quote escape the $1 $2 etc variables instead of double quotes. An easy search and replace does the trick. I put all my normal rsync modifiers in that script and then ran my script like so (assuming call-rsync.sh is in $PATH)- if not, go to that directory and run ./call-rsync.sh (see example below). Make sure that script is chmod +x.

Works a charm:
call-rsync.sh '/Users/acepelon/Music/iTunes/iTunes?Library' /Volumes/ACE-iPod/MusicBackupFromLocalMusic

I really hope that helps someone. Rsync has always been a tiny bit of a mystery to me but now I will be able to use it confidently with logging too.

acepelon

activescott 12-29-2011 08:30 PM

.Trashes can cause this error
 
Just in case this might help others. I was searching for this error and after some thought I realized that the problem was because rsync couldn't copy a .Trashes folder on a mac (i.e. a permissions issue). It was difficult to notice at first because I had -v (verbose) option on and the .Trashes error occurred as the first line of the output so I never saw it until I turned off verbose.

So this failed:

Code:

rsync -a /Volumes/ScottsVMs/ /Volumes/My\ Book/Virtual\ Machines/
But this fixed it:

Code:

rsync -a --exclude='.Trashes' /Volumes/ScottsVMs/ /Volumes/My\ Book/Virtual\ Machines/
Hope this helps somebody!


All times are GMT -5. The time now is 05:46 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.