I have a script with some different options, but you can use something like:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #FFEE80;
overflow: auto;"
title="this text can be pasted into the Script Editor">
property DryRun : false -- set to true for testing
property LogFile : true -- set to true to write to a log file
set SourceFolder to (choose folder with prompt "Select a source folder:")
-- set SourceFolder to text 1 thru -2 of (SourceFolder as text) -- copy folder by name
set Source to quoted form of POSIX path of SourceFolder -- format for the shell script
set DestinationFolder to (choose folder with prompt "Select a destination folder:")
set Destination to quoted form of POSIX path of DestinationFolder -- format for the shell script
set Command to "/usr/bin/rsync --archive --compress --human-readable --stats --verbose --verbose " -- extra verbosity
if DryRun then
set Command to Command & "--dry-run " -- fake it
end if
if LogFile then
get (POSIX path of ((path to home folder) as text) & "Library/Logs/AS_rsync.log")
set Command to Command & "--log-file=" & (quoted form of the result) & space
end if
try -- output any additional info
do shell script Command & Source & space & Destination
set TheResult to paragraphs of the result
if LogFile then
set SummaryText to "rsync successful (see log):"
else
set SummaryText to "rsync successful:"
end if
on error errmess
set TheResult to paragraphs of errmess
set SummaryText to "rsync had errors:"
end try
choose from list TheResult with prompt SummaryText with empty selection allowed
</pre>
Check the logs and any errors for clues. For that missing file, you might try using a
--delete-before option