+ Post New Thread
Results 1 to 3 of 3
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. Currently, ...
  1. #1
    dayzd's Avatar
    Join Date
    Nov 2009
    Location
    In front of computer
    Posts
    408
    Thank Post
    79
    Thanked 61 Times in 49 Posts
    Rep Power
    26

    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):
    Code:
    # 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?

  2. #2

    Join Date
    Oct 2007
    Location
    Lincolnshire
    Posts
    133
    Thank Post
    0
    Thanked 22 Times in 22 Posts
    Rep Power
    18
    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?

  3. #3
    dayzd's Avatar
    Join Date
    Nov 2009
    Location
    In front of computer
    Posts
    408
    Thank Post
    79
    Thanked 61 Times in 49 Posts
    Rep Power
    26
    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.



SHARE:
+ Post New Thread

Similar Threads

  1. printers and login scripts
    By rocknrollstar in forum Windows
    Replies: 22
    Last Post: 22nd April 2010, 04:47 PM
  2. GPO problem with scripts
    By irsprint in forum Windows Server 2000/2003
    Replies: 9
    Last Post: 11th September 2009, 12:41 PM
  3. login scripts
    By palmer_eldritch in forum Mac
    Replies: 1
    Last Post: 6th March 2008, 11:47 AM
  4. Replies: 7
    Last Post: 20th December 2007, 04:45 PM
  5. Problem with Home Drive and login scripts
    By ArchersIT in forum Windows
    Replies: 4
    Last Post: 11th July 2007, 01:17 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •