[prev in list] [next in list] [prev in thread] [next in thread] 

List:       unison-users
Subject:    Re: [unison-users] run Unison unattended but alert when conflicts
From:       "Jeroen T. Vermeulen" <jtv () xs4all ! nl>
Date:       2005-12-13 12:57:01
Message-ID: 21604.202.47.247.130.1134478621.squirrel () webmail ! xs4all ! nl
[Download RAW message or body]


> So if you're doing this from a cron job, for instance, you might want to
> do something like:
>
> if ! unison -batch ourprofile ; then
>     echo 'Unison filesystem synchronization failed!' >&2
> fi

Oops, I forgot to mention the best part.

The best part is that you don't have to check unison's exit codes every
time it runs; *it doesn't matter* if there are multiple things that can
cause the files to be synchronized, and some of them are never checked for
conflicts.  If there is a conflict that takes human attention to resolve,
then by definition that conflict will stay around until you get the chance
to check and warn a human.

So even if the unison command is normally run from somewhere else, and
without checking the exit code, you can just add a cron job like I
described.  It may cause a few extra synchronizations, if your files
change a lot, but apart from any added resource demands, there should be
no risk of unison breaking anything because of it.  You might get some
version skew between two files that need to be consistent, if one of them
could not be synchronized due to a conflict.  But if that were a problem
you should be using a networked filesystem in the first place.

Some useful options you may want to use for unattended synchronization:

 -auto or -batch
 -silent or -terse
 -contactquietly
 -log


Jeroen




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/26EolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/unison-users/

<*> To unsubscribe from this group, send an email to:
    unison-users-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic