2

I've been using rsync on OS X to sync all our website admins. It was working fine until the OS X 10.6.3 update!

Now it creates thousands of empty (0-kb) folders. It only does it when synching to a mounted network drive (which we need to do) as when I sync to my local drive it works as usual!

I've tried excludes which don't seem to be working... also tried a different version of rsync so it's an OS X issue.

echo ""
echo "~*~*~*~*~*~*~*~*~*~*~*~*~*"
echo " SYNCING up KINEMASTIK"
echo "~*~*~*~*~*~*~*~*~*~*~*~*~*"

/usr/local/bin/rsync -aNHAXv --progress --exclude-from 'exclude.txt' /Volumes/Groups/Projects/483_Modern_Activity_Website/web/youradmin/ /Users/dan/Dropbox/documents/WORK/kinemastik/WEBSITE/youradmin/  

echo ""
echo "~*~*~*~*~*~*~*~*~*~*~*~*~*"
echo " SYNCING up CHRIS BROOKS YOURADMIN"
echo "~*~*~*~*~*~*~*~*~*~*~*~*~*"

/usr/local/bin/rsync -aNHAXv --progress --exclude-from 'exclude.txt' /Volumes/Groups/Projects/483_Modern_Activity_Website/web/youradmin/ /Volumes/Groups/Projects/516_ChrisBrooks/website/youradmin/

Has anyone experienced the same problem?

2
  • 1
    What are the N, A and X flags for ? I don't see these listed in man rsync on Mac OS X 10.6.3. Try just rsync -nHv...
    – Paul R
    Commented Apr 23, 2010 at 10:38
  • I'm having the same problem, using flags -arpV. The rsync was working the first time I ran it, but I hit a an error on a file. I deleted that file and restarted it and ever since then, it doesn't seem to do anything except for create those .DS_STORE files. Commented Jan 30, 2011 at 2:35

5 Answers 5

2

I know this is an old question but I recently had the issue, found the answer elsewhere (http://hintsforums.macworld.com/showthread.php?t=116751), and wanted to share it.

Apparently it happens b/c rsync attempts to create a temp file to which it copies the file before it renames it. The temp file name is in the form of ".{filename}.{some unique id}". Since the file is ".DS_Store" it creates "..DS_Store.{some unique id}". But it seems OS X has trouble w/ files that start w/ ".." so rsync fails quietly and tries again (repeat ad nauseum).

The solution is to ignore the .DS_Store file.

People have also had trouble deleting these ..DS_Store.{some unique id} files. To delete them run:

find . -name '..DS_Store*' -print0 | xargs -0 rm

ERRATA:

The command above to delete the files didn't end up working for me. I had to move to my Windows machine (which is connected to this external drive via an Airport Extreme) and delete the files. I imagine mounting the drive directly to my Mac via firewire may have also worked.

3
  • By ignoring you mean what @JRobert suggested? Or how do you ignore?
    – Daniel Beck
    Commented Mar 31, 2011 at 5:25
  • Yes, what JRobert suggested. And for the record, the cmd to delete the ..DS_Store files ended up not working for me. I'll edit my answer to reflect that.
    – pcg79
    Commented Apr 18, 2011 at 16:30
  • wrt find . -name '..DS_Store*' -print0 | xargs -0 rm: this actually does seem to work on my macOS Ventura using GNU's find-utils pkg via MacPorts. But I run it like this: find /Volumes/MyBackups -name '.DS_Store' | xargs rm
    – Seamus
    Commented Mar 22 at 0:37
1

Broken rsync command syntax? A quick check of the man file on my machine (10.6.3) shows:

   --exclude-from=FILE     read exclude patterns from FILE
1
  • No. The = is optional here, as it is on all --options in rsync.
    – Seamus
    Commented Mar 21 at 23:16
0

Happens to me too. I havent tried it yet but a temporary fix is to exclude all invisible files, at least according to a post on the subject in Apple's Discussions.

http://discussions.apple.com/thread.jspa?threadID=2398971&tstart=60

0

As I recall you can stop that behaviour easily with Onyx: there should be (in one of the last tabs) the possibility to disable the creation of DS_STORE files to remote computers.

alt text

0

The rsync option used (--exclude-from 'exclude.txt') is correct syntax. It will work provided:

  1. your script knows where exclude.txt is located

  2. the content of exclude.txt includes the following line: .DS_Store

  3. your --exclude-from option is declared "early" in the rsync invocation; IOW:

# THIS: 
/usr/local/bin/rsync --exclude-from 'exclude.txt' -aNHAXv --progress /Volumes/Groups/Projects/483_Modern_Activity_Website/web/youradmin/ /Users/dan/Dropbox/documents/WORK/kinemastik/WEBSITE/youradmin/
# NOT THIS:
/usr/local/bin/rsync -aNHAXv --progress --exclude-from 'exclude.txt' ...

.DS_Store files are an Apple plague, and recent observations suggest the plague is getting worse.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .