Mac Thread, Rsync problem in login/out scripts in Technical; Hello everyone. Just after a bit of help regarding the use of rsync in an OS X Bash script.
16th March 2010, 09:25 AM #1
Rsync problem in login/out scripts
Hello everyone. Just after a bit of help regarding the use of rsync in an OS X Bash script.
Currently, we have a peculiar setup where our Mac systems are integrated into our Windows AD network. We use the same logins for the Macs as on Windows and the same home folders are mounted by both.
At present, users iMovie Events videos are copied to the local machine on login, then synced back as they log out for performance reasons (there's probably a better way, but this is what we have following a hasty setup). For this task, I use the following (this is the login version, but only the paths change):
After users are logged in, the local Movies folder is linked to the ~/Movies folder so iMovie will use it's contents. At present, it seems to re-copy everything on login/out (ignoring the 'u' switch [.com]) leading to some frustratingly long login times.
# Copy documents from server to local folder
# a=archive (keep all metadata)
# u=update (Don't overwrite newer files)
# --delete=Delete files that don't exist on the sending side
# rsync -azruq --delete "$MOUNTNAME/$USERNAME/Movies/" "$LOCALFOLDER/$USERNAME/Movies/"
I've also learnt in the last couple of days that it also is ignoring the '--delete' declaration: When a pupil complained of her lengthy logins, I suggested she delete some old video, which she did, only to find it return when she next logged in!
Can anybody see any glaring errors /conflicts that I've managed to miss? I've tried a couple of variations with additional switches but to no avail...
Thanks in advance! Andy
P.S. We're looking into making our Mac network standalone for next year. Can anybody vouch for iMovie's performance on a purely Mac network with home folders on server?
16th March 2010, 10:01 AM #2
I know that the '--delete' option is ignored if there are any errors in the transfer, but that doesn't explain why the 'update' option isn't working. Could you enable logging to see what's going on?
16th March 2010, 11:23 AM #3
I've just taken a look at some logs, and there've been some errors from rsync when trying to change the ownership group on the copied items. I guess that's why delete doesn't work!
EDIT: Got my rsync command before I've set permissions on the receiving folders. D'oh!
Last edited by dayzd; 16th March 2010 at 11:25 AM.
By rocknrollstar in forum Windows
Last Post: 22nd April 2010, 04:47 PM
By irsprint in forum Windows Server 2000/2003
Last Post: 11th September 2009, 12:41 PM
By palmer_eldritch in forum Mac
Last Post: 6th March 2008, 11:47 AM
By djstylus in forum Windows
Last Post: 20th December 2007, 04:45 PM
By ArchersIT in forum Windows
Last Post: 11th July 2007, 01:17 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)