Unison: Unterschied zwischen den Versionen

Aus wiki.archlinux.de
(1. Version - ich kapier nicht wie man hier Bilder einfügt ;))
 
(jaja, is halt aus dem englichen Wiki - erwischt :))
Zeile 12: Zeile 12:
Beispiel Script:
Beispiel Script:


'''~/.unison/electra.prf''' (My laptop)
'''~/.unison/electra.prf''' (Laptop)
  root = /home/hugo
  root = /home/hugo
  root = ssh://pyros//home/hugo
  root = ssh://pyros//home/hugo
Zeile 18: Zeile 18:
  include common
  include common


'''~/.unison/pyros.prf''' (My desktop)
'''~/.unison/pyros.prf''' (Desktop)
  root = /home/hugo
  root = /home/hugo
  root = ssh://electra//home/hugo
  root = ssh://electra//home/hugo
Zeile 83: Zeile 83:
Wie man sieht, gibt es zwei verschiedene Profile, Laptop und Desktop.  
Wie man sieht, gibt es zwei verschiedene Profile, Laptop und Desktop.  


Im Beispiel stehen Bash-Aliase für den schnellen Einsatz. Ein Beispiel dafür ist:
Im diesem Beispiel benutzt man Bash-Aliase für den schnellen Einsatz:
   unisync alias = "Unisono-gtk2 electra-contactquietly-Log-Datei /dev/null"
   unisync alias = "Unisono-gtk2 electra-contactquietly-Log-Datei /dev/null"
Bedeutet, man startet unisync mit dem Profil "Electra", wenn der Laptop syncronisiert werden soll.
Bedeutet, man startet unisync mit dem Profil "Electra", wenn der Laptop syncronisiert werden soll.

Version vom 7. Oktober 2009, 21:21 Uhr

Datei:Http://caml.inria.fr/about/successes-images/unison.jpg

Unison

URL: Unison

Unison ist ein Programm für Windows und Linux zur Synchronisation von Dateien und Verzeichnissen auf verschiedenen Rechnern bzw. Festplatten/Datenträgern. Beim Abgleich werden nur Änderungen an den Daten synchronisiert, so dass ein erneuter Abgleich sehr schnell durchgeführt werden kann.

Unison ist einfach zu konfigurieren, und dennoch sicher und flexibel.

Ssh und unison muss auf beiden Maschinen installiert sein. Mit ein paar einfachen Befehlen kann man nun Verzeichnisse synchronisieren, und in einer GUI können die Dateien und Verzeichnisse wählen, die man synchronisieren möchte.

Beispiel Script:

~/.unison/electra.prf (Laptop)

root = /home/hugo
root = ssh://pyros//home/hugo
follow = Path school
include common

~/.unison/pyros.prf (Desktop)

root = /home/hugo
root = ssh://electra//home/hugo
follow = Path school
include common

~/.unison/common

ignore = Regex .*(cache|Cache|te?mp|history|thumbnails).*
ignore = Name sylpheed.log*
ignore = Name unison.log
ignore = Name .ICEauthority
ignore = Name .Xauthority
ignore = Path {.songinfo,.radinfo}
ignore = Path .adesklets
ignore = Path .Azureus
ignore = Path .forward
ignore = Path adesklets
ignore = Path .ethereal
ignore = Path .sheep
ignore = Path .xinitrc
ignore = Path .config
ignore = Path .xscreensaver
ignore = Path .xawtv
ignore = Path .radio
ignore = Path .forward
ignore = Path .dc++
ignore = Path .quodlibet
ignore = Path .tvtime
ignore = Path .config/graveman
ignore = Path .xmodmap
ignore = Path .java
ignore = Path .tvlist*
ignore = Path .thumbnails
ignore = Path .ssh
ignore = Path .viminfo
ignore = Path .vim/tmp
ignore = Path Desktop
ignore = Path .wine*
ignore = Path motion
ignore = Path src/ufobot/test_pipe
ignore = Path tmp
ignore = Path local
ignore = Path books
ignore = Path .mozilla/firefox/*/Cache*
ignore = Path .liferea/cache
ignore = Path .liferea/mozilla/liferea/Cache
ignore = Path .sylpheed-*/*.bak
ignore = Path .sylpheed-*/folderlist.xml*
ignore = Path .liferea/new_subscription
ignore = Path .mozilla/firefox/pluginreg.dat
ignore = Path .mozilla/firefox/*/lock
ignore = Path .mozilla/firefox/*/XUL.mfasl
ignore = Path .mozilla/firefox/*/xpti.dat
ignore = Path .mozilla/firefox/*/cookies.txt
ignore = Path .xbindkeysrc
ignore = Path .unison/ar*
ignore = Path .gaim/icons
ignore = Path .gaim/blist.xml
ignore = Path .asoundrc
ignore = Path .maillog
ignore = Path .openoffice2/.lock


Wie man sieht, gibt es zwei verschiedene Profile, Laptop und Desktop.

Im diesem Beispiel benutzt man Bash-Aliase für den schnellen Einsatz:

 unisync alias = "Unisono-gtk2 electra-contactquietly-Log-Datei /dev/null"

Bedeutet, man startet unisync mit dem Profil "Electra", wenn der Laptop syncronisiert werden soll.

Um die Verarbeitung zu automatisieren (zur Synchronisierung mit dem Laptop):

 xterm -e 'ping -q -W 2 -c 2 pyros && unison-gtk2 electra -contactquietly -logfile /dev/null && gxmessage -buttons no:0,yes:1  
 Syncing done. Shutdown pyros? || ssh pyros sudo halt' &