0

I'm trying to synchronize two directories using Unison, however if it encounters a file with an error, then it skips the entire directory! I don't believe it should skip the whole directory, and instead should just skip that file. I'm OK with that. How do I tell it to ignore the error and continue to copy the rest of the files?

The Unison is a Windows executable, not Cygwin. I can read the file with Cygwin. Unison does in fact encounter an error on the file, and I'm OK with skipping them.

Version 2.32 works better than 2.40. Version 2.40 won't even start.

I've tried adding -ignore, but that doesn't help. Here is what I tried:

$ unison 'c:\cygwin' 'socket://xps:4321/c:/cygwin'
UNISON 2.32.52 started propagating changes at 02:53:35 on 27 Feb 2013
[ERROR] Skipping etc
  [root 1]: Error in digesting c:/cygwin/etc/ssh_host_dsa_key:
c:/cygwin/etc/ssh_host_dsa_key: Permission denied
[ERROR] Skipping home
  [root 1]: Error in digesting c:/cygwin/home/SYSTEM/.bash_history:
c:/cygwin/home/SYSTEM/.bash_history: Permission denied
...
Saving synchronizer state
Synchronization complete at 02:53:39  (3 items transferred, 2 skipped, 0 failed)
  skipped: etc
  skipped: home




$ unison 'c:\cygwin' 'socket://xps:4321/c:/cygwin' -ignore 'Path etc\ssh_host_dsa_key' -ignore 'Path home\SYSTEM\.bash_history'
Contacting server...
Connected [//dumbopc/c:/cygwin -> //xps/c:/cygwin]
Looking for changes
  Waiting for changes from server
Reconciling changes
local          xps
         error            etc
[root 1]: Error in digesting c:/cygwin/etc/ssh_host_dsa_key:
c:/cygwin/etc/ssh_host_dsa_key: Permission denied
         error            home
[root 1]: Error in digesting c:/cygwin/home/SYSTEM/.bash_history:
c:/cygwin/home/SYSTEM/.bash_history: Permission denied
...
Proceed with propagating updates? [] g
Propagating updates    
UNISON 2.32.52 started propagating changes at 04:11:26 on 27 Feb 2013
[ERROR] Skipping etc
  [root 1]: Error in digesting c:/cygwin/etc/ssh_host_dsa_key:
c:/cygwin/etc/ssh_host_dsa_key: Permission denied
[ERROR] Skipping home
  [root 1]: Error in digesting c:/cygwin/home/SYSTEM/.bash_history:
c:/cygwin/home/SYSTEM/.bash_history: Permission denied
...
UNISON 2.32.52 finished propagating changes at 04:11:28 on 27 Feb 2013
Saving synchronizer state
Synchronization complete at 04:11:30  (6 items transferred, 2 skipped, 0 failed)
  skipped: etc
  skipped: home



# Version 2.40
C:\Program Files\Unison>"Unison-2.40.102 Text.exe"  'c:\cygwin' 'socket://xps:4321/c:\cygwin'
Contacting server...
Fatal error: Wrong number of roots: 2 expected, but 4 provided ('c:\cygwin', 'socket://xps:4321/c:\cygwin', , )
(Maybe you specified roots both on the command line and in the profile?)


@REM DOS
C:\cygwin\etc>type ssh_host_dsa_key
Access is denied.

# Cygwin
$ ls -l /etc/ssh_host_dsa_key
-rw------- 1 SYSTEM None 668 Aug 30  2010 /etc/ssh_host_dsa_key

$ cat /etc/ssh_host_dsa_key
-----BEGIN DSA PRIVATE KEY-----

Command line reference:

http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#prefs

1 Answer 1

0

I believe you have to use version 2.40. I believe version 2.40 was giving an error because default.pref was not empty. Delete %HOME%.unison\default.pref or $HOME/.unison/default.pref. You also have to explicitly tell it to preserve modification times with --times.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .