Unison: Unterschied zwischen den Versionen

Aus wiki.archlinux.de
KKeine Bearbeitungszusammenfassung
KKeine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
{{unvollständig}}
[[Bild:Unison.jpg|thumb|Unison Screenshot]]
[[Bild:Unison.jpg|thumb|Unison Screenshot]]



Version vom 8. April 2010, 09:45 Uhr

Dieser Artikel oder Artikelabschnitt ist noch nicht vollständig!


Datei:Unison.jpg
Unison Screenshot

Unison (GTK)

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 kann man die Dateien und Verzeichnisse wählen, die man synchronisieren möchte.

Installation:

pacman -Sy unison

Nach dem starten von unison kann man Profile für die unterschiedlichsten Aufgaben einrichten. So ist es zum Beispiel möglich den gesammten Benutzer-Ordner oder nur Musik/Bilder/Dokumente zu synchronisieren.

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. Was mit der common-Datei konfiguriert wird erklärt sich selbst.

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

 unisync alias = "Unison-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' &