theYinYeti Posted February 27, 2008 Share Posted February 27, 2008 (edited) Hello, I want to use Unison in batch mode for a given path without recursivity. What I have so far does not work. Here's my test config: $ find /home/yves/test /home/yves/test/ /home/yves/test/client /home/yves/test/client/var /home/yves/test/client/var/unison /home/yves/test/client/var/unison/default.prf /home/yves/test/client/var/unison/backup /home/yves/test/client/share /home/yves/test/client/share/rep /home/yves/test/server /home/yves/test/server/share /home/yves/test/server/share/rep $ cat /home/yves/test/client/var/unison/default.prf sortbysize = true group = true owner = true times = true perms = -1 I then synchronize client/share and server/share: $ UNISON=/home/yves/test/client/var/unison \ unison default /home/yves/test/client/share ssh://yves@localhost//home/yves/test/server/share \ -ui text -dumbtty \ -backupdir /home/yves/test/client/var/unison/backup \ -logfile /home/yves/test/client/var/unison/log \ -sshargs -x From there, I create a file in the client's "rep", and a non-empty sub-directory in the server's "rep", and I try and synchronize both non-recursively using the path and ignore parameters: $ touch /home/yves/test/client/share/rep/repfic $ mkdir /home/yves/test/server/share/rep/reprep $ touch /home/yves/test/server/share/rep/reprep/reprepfic $ UNISON=/home/yves/test/client/var/unison \ unison default /home/yves/test/client/share ssh://yves@localhost//home/yves/test/server/share \ -ui text -dumbtty -auto -contactquietly -silent -batch -terse \ -backupdir /home/yves/test/client/var/unison/backup \ -logfile /home/yves/test/client/var/unison/log \ -sshargs -x -path "Path rep" -ignore "Path rep/*/*" I expected rep/repfic to go to the server, and rep/reprep (but not rep/reprep/reprepfic) to go to the client. Instead, nothing happens. Do you understand why? Yves. //EDIT Out of curiosity, I looked at my /home/yves/test/client/var/unison/log file, and Surprise! here's the content: UNISON started propagating changes at 19:40:40 on 26 Feb 2008 [BGN] Copying rep/repfic from /home/yves/test/client/share to //localhost//home/yves/test/server/share [BGN] Copying rep/reprep from //localhost//home/yves/test/server/share to /home/yves/test/client/share [END] Copying rep/reprep [END] Copying rep/repfic UNISON finished propagating changes at 19:40:40 on 26 Feb 2008 Synchronization complete (2 items transferred, 0 skipped, 0 failures) This is what I expect! Why is the result different? //EDIT 2 I tried the newer version 2.27.57 from source. Now there's not even a log file to agree with me :( Once the -auto -contactquietly -silent -batch -terse options are removed, the software just says: Nothing to do: replicas have not changed since last sync. Edited February 28, 2008 by theYinYeti Link to comment Share on other sites More sharing options...
theYinYeti Posted February 28, 2008 Author Share Posted February 28, 2008 I misread the manuel, even though I read it many many times. I'm at fault: -path "Path rep" must be written -path "rep" instead. Yves. Link to comment Share on other sites More sharing options...
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