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

etaleb

macrumors 6502a
Original poster
Apr 7, 2012
665
35
Maine
Guys - doing a plain SMB copy from W10 PC and Mac OS is returning errors on some files and giving up. Is rSync my best choice and can anybody provide syntax where it doesn't give up if a file doesn't get copied over successfully. Instead, I would simply like to see a report of what files it failed to copy over as it's likely I don't even care about those files. I'm not interested in any rights permission being copied over since it's coming from Windows to a new Mac and I'm the only user & admin. Both machines are on the wired LAN and I don't care if it takes. few days to copy everything over

Thanks
 
Answering my own question. Trying carbon copy cleaner now. Seems many folders just doing copy/paste in Finder didn't fully copy over and I can't find logs what didn't copy over. At least with CCC, I think I'll get that. If not, rsync is my next bet
 
I'm using this bash script as a daily cron job to sync an SMB share to a local external disk.
If errors occur, you find a timestamped log-file on your desktop. Not too elegant but works.
Btw, for me it takes <60s to compare 1TB if the target drive is formatted APFS whereas ~2h for an NTFS drive...
Bash:
Source="InsertYourMountedSmbShare"
Target="InsertYourTargetFolder"
/usr/bin/rsync --archive --compress --delete-after --times /Volumes/$Source/ /Volumes/$Target >> /tmp/rsync_logfile.log 2>&1
if [ -s /tmp/rsync_logfile.log ]
then
    DATE_WITH_TIME=`date "+%Y%m%d-%H%M%S"`
    cp /tmp/rsync_logfile.log ~/Desktop/rsync_logfile_$DATE_WITH_TIME.log
    /usr/bin/osascript -e "tell application \"System Events\" to display dialog \"Syncing completed with errors.\" & return & \"Check log-file on desktop!\" with title \"rsync Backup\" giving up after 10"
fi
rm /tmp/rsync_logfile.log
 
Last edited:
  • Like
Reactions: Brian33
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.