by simon baird

Monday, April 20, 2009

rsync grr...

From man rsync:

In particular, when transferring to Windows FAT filesystems which cannot
represent times with a 1 second resolution --modify-window=1 is useful.

So in summary, rsync is pretty close to COMPLETELY USELESS when the destination is a FAT filesystem... UNLESS you find this little note hidden in the man page and do --modify-window=1.

Well at least it's working now. And I'm not copying 180G to my poor usb drive each time I run rsync. So anyway, here is my solution for backing up my Macbook with rsync...

#!/bin/sh

START=`date`
SOURCE=/Users/Simon
DEST=/Volumes/SEAGATE/Backup/Users

rsync -av \
    --delete \
    --delete-excluded \
    --modify-window=1 \
    --exclude '.Trash/*' \
    --exclude 'Downloads/*' \
    --exclude 'Torrents/*' \
    --exclude 'Library/Caches/*' \
    $SOURCE $DEST

END=`date`

echo Started $START
echo Ended $END


Disclaimer: This is very basic and I don't know much about rsync or Mac OS X. Please Google rsync backup for more expert advice.

To the rsync developers, I get it, I'm a big fat luser for using FAT. But do you think just maybe rsync could just possibly notice this condition and deal with it automatically? Perhaps even with a big warning, "WARNING, destination filesystem is FAT, automatically enabling --modify-window=1, please see man page". Maybe then I would have been asleep two hours ago which would have been very, very nice.

2 comments:

FND said...

Thanks for sharing!

I might include this in my rsync script (I'm far from an expert myself though... ).

Arman oDesk said...

GSCopy Pro v6.0 (RoboCopy Alternative) with Open File Agent
GSCopyPro is a single command-line tool (CLI) that can copy, replicate and move files from one folder to another. This folder can be on the same machine/ server or another server elsewhere. What makes GSCopyPro stand out from other competitors is the fact it works on 32-bit as well as 64-bit systems and has no restrictions. It can easily be scheduled to run as a scheduled task and fully automated. GSCopyPro also comes with an open file agent which can copy files that are locked/ opened by other processes. This feature is supported in all windows vSCersions from widows XP/ 2003 and later.
Go To:>> http://www.gurusquad.com/GOPYPRO