Recent Changes - Search:

Using Unison on Specific Operating Systems

Generic Unix
Mac OS X
Windows


Generic Unix Questions

Is it OK to mount my remote filesystem using NFS and run unison locally, or should I run a remote server process?

NFS-mounting the replicas is fine, as long as the local network is fast enough. Unison needs to read a lot of files (in particular, it needs to check the last-modified time of every file in the repository every time it runs), so if the link bandwidth is low then running a remote server is much better.

I've heard that the Unix file locking mechanism doesn't work very well under NFS. Is this a problem for Unison?

No.

What will happen if I try to synchronize a special file (e.g., something in /dev, /proc, etc.)?

Unison will refuse to synchronize such files. It only understands ordinary files, directories, and symlinks.

Is it possible to run Unison from inetd (the Unix internet services daemon)?

Toby Johnson has contributed a detailed chroot min-HOWTO describing how to do this. (Yan Seiner wrote an earlier howto, on which Toby's is based.)


OS X

Does Unison work on Mac OSX?

Quite well! Download it (both GUI and text, and Universal-binaries) from http://alan.petitepomme.net/projets/unison/

Recent versions of Unison work well on OS X, including support for synchronizing files with resource forks, handling of creator strings,etc. Though, if syncing to non-osx box, it may be best to ignore resource-forks and other items peculiar to os-x as described below. If you really need os-x metadata, there is a free tool called "Backup Bouncer" used to test how-well backup software can restore metadata: http://www.n8gray.org/code/backup-bouncer/

Both the text-mode interface and a native OSX graphical user interface are available. (Thanks in particular to Ben Willmore for huge improvements to the latter!)

BEFORE you run unison for first time, edit your .prf files. If you already ran unison, you can make it think it was never run by deleting all files EXCEPT *.prf in same folder as the prf files. You can find them as follows:

For those who don't like Terminal: go to ~/Library/Application Support/Unison, ctrl-click on any .prf file, and select "Open With -> TextEdit".

For those who like Terminal:

cd ~
ln -s Library/Application\ Support/Unison .unison
cd ~/.unison
open -e blah.prf (or nano -w blah.prf or vi blah.prf )

Once you have the prf file open in an editor, consider adding lines below.

Not sure if fastcheck helps with mac, but worth a try! Also worth trying sortnewfirst and confirmbigdeletes:

fastcheck = true
sortnewfirst = true
confirmbigdeletes = true

Trying to sync resource forks is probably not worth the time and trouble for most users, so to tell unison to ignore resource forks, include this line in the profile:

rsrc = false

If cross-platform syncing, ignore permssions (or try it on mac-to-mac if you understand umasks):

perms = 0
  • Unison will be confused by some files that are frequently updated by OSX, and will report lots of errors of the form "XXX has been modified during synchronization." These files --- in particular, files with names like .FBCLockFolder and .FBCIndex --- should be ignored by adding these lines to your profile:
    ignore = Name .FBCIndex
    ignore = Name .FBCLockFolder]
    ignore = Name .Apple*

(These files are from 10.3.9 and earlier so you may not have .FB* files unless you migrated from old macs. If you used netatalk in past but not now, you may want to ignore or get rid of .Apple* like .AppleDouble files.)

The wiki may wrap 2 big lines below, so unwrap so you have 2 lines each starting with "ignore = Name {..."

ignore = Name {Cache*,.Trash*,.VolumeIcon.icns,.HSicon,Temporary*,.Temporary*,TheFindByContentFolder}

ignore = Name {TheVolumeSettingsFolder,.Metadata,.filler.idsff,.Spotlight,.DS_Store,.CFUserTextEncoding}

You may want to consider ignoring all files whose name start with a dot, end in .tmp and others:

ignore = Path .*
ignore = Name Thumbs.db
ignore = Name *.tmp

Spotlight (10.4+) and TimeMachine (10.5+) running in background can slow down your mac, and you may want to temporarily disable them during a big sync. Also, it may be possible to tell spotlight never to index a folder by making the name end in ".noindex" For example, you could create in /Users/Shared/ a folder named Downloads.noindex and tell Firefox to store downloads there.

  • Unison does not run on Mac OS 9 or earlier.

Can Unison synchronize an OS X machine with a Unix machine?

Yes, but new OS X users may be confused by restrictions on file names: although OS X respects case in file names, two files whose names differ only in case may not coexist on the same file system. If such files exist on the Unix side, Unison will report the error but not identify the offending files. Unix users can identify such files with the aid of a script like this:

find . -print | tr A-Z a-z | sort | uniq -c | awk '$1 > 1' |
tee /tmp/duplicates

Installing Unison from Fink (on OS X) does not work.

We've had reports that fink installation only works when the unstable packages are selected. See for more information.

How do I install a Terminal only Unison using Darwinports?

Mac Geekery has a short tutorial describing how to do it.

How do I pass environment variables to the Aqua version of Unison?

Create a file .MacOSX/environment.plist in your home directory containing:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UNISONLOCALHOSTNAME</key>
<string>my_canonical_host_name_for_unison</string>
</dict>
</plist>

For more information about this file, see ??? .


Windows

Try these few steps to install unison-gui on windows.

  1. Install pidgin http://www.pidgin.im/download/windows/ (this will install the gtk pre-requisite)
  2. Download unison zip files from http://alan.petitepomme.net/projets/unison
  3. Extract/copy the unison*.exe files from the zip file to c:\program files\common files\GTK\2.0\bin
  4. Right-click on the unison*gtk.exe (in above "bin" folder) and send to desktop (to create a shortcut).
Edit - History - Print - Recent Changes - Search
Page last modified on March 22, 2011, at 06:50 PM