dayzd Posted March 16, 2010 Posted March 16, 2010 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): # Copy documents from server to local folder # a=archive (keep all metadata) # z=compress # r=recursive # u=update (Don't overwrite newer files) # q=quiet # --delete=Delete files that don't exist on the sending side # rsync -azruq --delete "$MOUNTNAME/$USERNAME/Movies/" "$LOCALFOLDER/$USERNAME/Movies/" 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. 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?
keithu Posted March 16, 2010 Posted March 16, 2010 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?
dayzd Posted March 16, 2010 Author Posted March 16, 2010 (edited) 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! Edited March 16, 2010 by dayzd
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now