I am using rsync with Mac OS X. I am trying to
setup the following script written by Mike Bombich:
# and "args".
# This script can be run from the cron whenever.
## Indicate the directories that should be
synchronized
# Encode the spaces with "%space"
#set syncDirs = (.hidden Applications
Applications%space(Mac%spaceOS%space9)
System System%spaceFolder Library usr bin sbin
mach_kernel private)
set syncDirs = ( Applications )
# Determine if script was run by root
set user = `whoami`
if ( $user != root ) then
echo "You must run this script as root, else you
may not have privileges"
echo "to properly restore all files."
exit 1
endif
## Setup the argument components
set masterDir = "/Volumes/imacnroll/MacOSX/
MasterBase"
set rsync = "/usr/bin/rsync"
set ssh = "--rsh=/usr/bin/ssh"
set recursive = "--recursive"
set preserve = "--times -og --links"
set prog = "--progress"
set stats = "--stats"
set delete = "--delete"
set remoteUser = "admin"
set server = "imacnroll"
## Assemble the arguments
#set args = ($prog $stats $ssh $recursive
$preserve $delete)
set args = ($prog $stats $ssh $recursive
$preserve)
# Synch the directories one at a time
foreach dir ($syncDirs)
set theDir = `echo $dir | sed 's/\%space/\ /g'`
$rsync $args
${remoteUser}@${server}:${masterDir}/${theDir}/ /
${theDir}/
# # Repair any custom folder icon flags if Dev
tools present
# if (-e /Developer/Tools/SetFile) then
# set iconFiles = `find $targetDir -name
"Icon?" | tr -d '\r' | sed 's/\ /%space/g'`
#
# foreach icon ($iconFiles)
# set dcIcon = "`echo "$icon" | sed
's/
%space/\ /g'`"
# /Developer/Tools/SetFile -a C
"$dcIcon:h"
# end
# endif
end
Some of the arguments are changed. When i run
the script, I get the following error:
link_stat /Volumes/Macintosh_HD/Applications/. :
No such file or directory
rsync error: partial transfer (code 23) at /
SourceCache/rsync/rsync-8.1/rsync/main.c(336)
client: nothing to do
Any ideas would be appreciated.
Thanks,
Eric Kaufmann