Unison: Difference between revisions

From miki
Jump to navigation Jump to search
Line 3: Line 3:
* [http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html Manual]
* [http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html Manual]
** [http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#profileegs Sample Profiles]
** [http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#profileegs Sample Profiles]
* [http://www.granneman.com/techinfo/security/backup/unisonbackup.htm Unison: Backup & synchronize files]


== Basic usage ==
== Basic usage ==

Revision as of 23:38, 23 July 2011

References

Basic usage

  • Synchronize two directories
unison <dir-a> <dir-b>
  • Selecting files to synchronize
    • Synchronize home directory, using Ignore facility to skip some files.
    • Create a subdirectory called shared, and synchronize that directory only.
    • (Linux only) Create a subdirectory called shared, with symbolic links to other local directories, and synchronize that directory only using follow (making symlink transparent).
    • Synchronize home directory as root, using -path switch on the command line:
      unison /home/username ssh://remotehost//home/username -path shared
      

      The -path option can be used as many times as needed, to synchronize several files or subdirectories:

      unison /home/username ssh://remotehost//home/username \
          -path shared \
          -path pub \
          -path .netscape/bookmarks.html
      

      These -path arguments can also be put in your preference file.

Configuration tips

  • On Samba / CIFS file system, ignore permissions:
perms = 0

Basic Profile

Here a basic setup to backup pen usb stick on Cygwin: