Mohammad Jaudet, Jaroslaw Polock
This document describes information about file synchronisation tools, which can be used at CERN to synchronise user directories on different Linux machines, possibly a desktop and a laptop. It is also available in multiple formats (HTML, PDF, PS, DVI and TEX)
unison is a synchroniser and is capable of recognising updates. It can be used to keep a remote replica of a directory structure up to date with a central repository and is capable of propagating updates in both directions and recognising conflicting updates .It uses the same ``rsync algorithm'' which streamlines updates of small parts of large files by transferring only the parts that have changed.
cvs is a full-blown version control system, and it has lots of other features (version history, multiple branches, etc.). It can also be used to keep a remote replica of a directory structure up to date with a central repository and is capable of propagating updates in both directions and recognising conflicting updates like unison. cvs also uses the rsync protocol for file transfer and requires manual notification whenever files are added or deleted. Moving files in cvs is , however, a bit tricky business.
Xfiles is set of independents Java based graphical applications for file synchronisation.
fsync is Perl script for files synchronisation on remote machines.
drsync is a front-end to rsync.
|slow conn. supported||yes||yes||yes||yes||yes||yes|
|ssh/rsh required||yes||yes||no||yes 2||yes||yes|
|automatic update with diff||yes||yes||yes||yes||yes||yes|
|dry run support||uk 1||yes||yes||uk 1||yes||yes|
|file selection||pro 4||cl 3||uk 1||uk 1||pro 4||cl 3|
|file ignore||no||cl||cl 3||cl 3||pro 4||cl 3|
|Scripting for RCS||yes||no||yes||yes||no||no|
|MS Windows support||yes||yes||yes||yes||uk 1||uk 1|
|availability of CERN distribution||yes||yes||yes||no||yes||yes|
1 means, the data is not known/confirmed right now.
2 just to start remote server and is optional.
3 means, option via command line.
4 optional via profile
The first time synchronisation takes time but subsequent one are relatively very fast. unison took approximately 13-15 minutes in scanning and then approximately 15 for copying while synchronising an AFS directory sized 570MB with the local directory. Both systems used for test were PIII 800 and with some what different memory configurations.
Unison provides both textual and graphical user interfaces.
# cd /afs/cern.ch/project/linux/l2k/nomadic/file-sync # rpm -ivh unison-2.6.11-1.i386.rpm
$ unison ssh://pcdis25/~/sub-dir /home/jaudet/sub-dir -ui graphics \ -group -owner -killServer -timesUpdating the files on desktop after modifications on the laptop machine.
$ unison /home/jaudet/sub-dir ssh://pcdis25/~/sub-dir -ui graphics \ -group -owner -killServer -timesNote: You don't need to use a remote host name if a laptop in connected to CERN network with AFS running. Just specify the directory names.
Usage: unison [SRC] [[<rsh|ssh><:>//HOST</|//>DEST] [OPTIONS] // means absolute path.
|-ui xxx||type of user interface ('text' or 'graphic')|
|-killServer||kill server when done (even when using sockets)|
|-times||synchronise modification times|
For ignoring files through profiles, please visit this link.
rsync is available on CERN Redhat 6.1 machines through ASIS. Check for GNU.DVP/rsync-2.4.3 if it is not there.
To install the latest version of rsync, use the following commands:
# cd /afs/cern.ch/project/linux/l2k/nomadic/file-sync # rpm -ivh rsync-2.4.6-1.i386.rpm
$ rsync -v -c -r -u -R -l -H -P -g -t -Z --progress --rsh=ssh \ pcdis25:~/sub-dir /home/jaudet/subdirUpdating the files on desktop after modifications on the laptop machine.
$ rsync -v -c -r -u -R -l -H -P -g -t -Z --progress --rsh=ssh \ /home/jaudet/sub-dir pcdis25:~/sub-dirUse -n option to know what would have been transferred. rsync uses rsh by default, use -e ssh to use ssh rather then rsh. To use absolute paths on the remote machine use :: instead of : after the host-name.
Note: You don't need to use a remote host name if a laptop in connected to CERN network with AFS running. Just specify the directory names.
Usage: rsync [OPTION]... SRC [SRC]... [USER@]HOST:DEST or rsync [OPTION]... [USER@]HOST:SRC DEST or rsync [OPTION]... SRC [SRC]... DEST or rsync [OPTION]... [USER@]HOST::SRC [DEST] or rsync [OPTION]... SRC [SRC]... [USER@]HOST::DEST or rsync [OPTION]... rsync://[USER@]HOST[:PORT]/SRC [DEST] SRC on single-colon remote HOST will be expanded by remote shell SRC on server remote HOST may contain shell wildcards or multiple sources separated by space as long as they have same top-level
|-v, -verbose||increase verbosity|
|-c, -checksum||always checksum|
|-r, -recursive||recurse into directories|
|-u, -update||update only (don't overwrite newer files)|
|-R, -relative||use relative path names|
|-l, -links||preserve soft links|
|-H, -hard-links||preserve hard links|
|-p, -perms||preserve permissions|
|-g, -group||preserve group|
|-t, -times||preserve times|
|-n, -dry-run||show what would have been transferred|
|-z, -compress||compress file data|
|-progressshow||progress during transfer|
|-e, -rsh=COMMAND||specify rsh replacement|
|-rsync-path=PATH||specify path to rsync on the remote machine|
|-exclude=PATTERN||exclude files matching PATTERN|
|-exclude-from=FILE||exclude patterns listed in FILE|
|-include=PATTERN||don't exclude files matching PATTERN|
|-include-from=FILE||don't exclude patterns listed in FILE|
This document was generated using the LaTeX2HTML translator Version 99.1 release (March 30, 1999)
Copyright © 1993, 1994, 1995, 1996,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -html_version 3.2,math -scalable_fonts -no_navigation -split 0 -show_section_numbers -dir . ftools.tex
The translation was initiated by Mohammad Jaudet on 2001-06-28