Problems with Rsync and iPhoto library

Discussion in 'OS X' started by tommekevda, May 10, 2011.

  1. tommekevda, May 10, 2011
    Last edited: May 11, 2011

    macrumors newbie

    Joined:
    Oct 27, 2010
    #1
    Hello everyone,

    I'm trying to backup my iPhoto library with rsync to an airdisk.
    I'm having some problems, the backup doesn't seem to go anywhere.
    it stays frozen on this.
    After more then 1 hour, still the same.
    iPhoto Library/.ipspot_update
    16 100% 0.00kB/s 0:00:00 (xfer#1, to-check=1030/1032)
    iPhoto Library/AlbumData.xml
    32768 0% 138.53kB/s 0:01:32

    According to activity monitor there's minimal network activity going on.
    i don't know what i'm doing wrong.
    There's the script i use.
    oh and i only want to copy data from my mac to my airdisks, so just 1 way sync, not 2 way :)
    Code:
    #/bin/bash
    
    echo "Checking if MacBackup airdisk local directory is available"
    if [ -d /Volumes/MacBackup/ ];
    then
    	echo "No need to create local directory in /Volumes"
    else
    	echo "Local directory not available, creating..."
    	mkdir /Volumes/MacBackup/
    fi
    
    if [ ! -f /Volumes/MacBackup/available.txt ];
    then
    	echo "Mounting MacBackup airdisk"
    	mount -t afp afp://username:password@ip/MacBackup /Volumes/MacBackup
    	disktool -r
    fi
    
    #Backing up iPhoto library
    if [ -f /Volumes/MacBackup/available.txt ];
    then
       echo "Backing up iPhoto Library"
       rsync -avz --delete --exclude '.DS_Store' --stats --progress ~/Pictures/iPhoto\ Library /Volumes/MacBackup/autobackup/
    else
       echo "MacBackup airdisk not available"
       #exit(1)
    fi
    
    
    
    if [ -d /Volumes/NightAirDisk/ ];
    then
    	echo "No need to create local directory in /Volumes"
    else
    	echo "Local directory not available, creating..."
    	mkdir /Volumes/NightAirDisk/
    fi
    
    if [ ! -f /Volumes/NightAirDisk/available.txt ];
    then
    	echo "Mounting NightAirDisk airdisk"
    	mount -t afp afp://username:password@ip/NightAirDisk /Volumes/NightAirDisk
    	disktool -r
    fi
    
    
    #Backing up truecrypt containers
    if [ -f /Volumes/NightAirDisk/available.txt ];
    then
       echo "Backing up truecrypt containers from NightAirDisk"
       #Put backup script here
      rsync -av --delete --exclude '.DS_Store' --stats --progress /Volumes/NightAirDisk/Tom/tc /Volumes/MacBackup/autobackup/
    else
       echo "NightAirDisk airdisk not available"
       #exit(1)
    fi
    
    
     
  2. thread starter macrumors newbie

    Joined:
    Oct 27, 2010
    #2
    i've already received some feedback from another source.
    They believe that iLife Media browser blocks the file. can anyone confirm?
    Btw, i'm using rsync 3.0.7
     
  3. dyn, May 19, 2011
    Last edited: May 19, 2011

    dyn
    macrumors 68000

    Joined:
    Aug 8, 2009
    Location:
    .nl
    #3
    I don't think that is correct. I managed to somewhat sync my iPhoto library. At the end it said it had some errors but it seemed to be referring to something in rsync itself, not the data I was syncing. I haven't noticed any file holding up the syncing process. The .ipspot_update file has synced without any problems whatsoever in my case. The only difference is that I'm using SMB/CIFS instead of AFP and my rsync command is: rsync -azvuhE --progress <src> <dest. I use -u because I don't want it to transfer everything, only files that are changed. The -E is for keeping the extended attributes, resource forks and ACLs (which is also intended). The -v and -h are used because I'm running it manually so I want to see and read what is happening. One other major difference: I'm using the rsync version that came with OS X and it is 2.6.9 (protocol version being 29).

    Could you try running the command manually and see what happens?

    Btw, disktool isn't used anymore so that will do nothing. You need to use diskutil instead.

    Edit: found the problem. On one machine the -E caused mds to go mad (135% cpu usage) and on both machines it caused the error regarding rsync. Without the -E everything works properly, no errors and it is even faster. In short: use the parameters I used but loose the -E!
     

Share This Page