REPL(1) REPL(1) NAME new, sync, scan - peer to peer replica management SYNOPSIS repl/new repl id dir [ excldir... ] repl/sync [ -N ] [ -12lrn ] repl1 repl2 [ dir... ] repl/scan repl DESCRIPTION These programs provide a simplified user interface to the peer-to-peer replica management system described in repl(8). Each peer is called a replica and holds a replicated file tree. Any number of replicas can be defined and any pair can be synchronized at any time. There is no centralized server nor there is a synchronization order required to detect conflicts. Each replica is described by a simple rc(1) script that identifies the file tree and related repl(8) information. The programs try to find configuration files at $home/lib/repl and /lib/repl unless a path is supplied. New defines a new replica repl for the given directory, using the given identifier. The identifier must be a lower case letter and must be unique for each peer of a replicated tree. The file repl created by the script is used later as an argument for sync and scan. The optional excldir argu- ments are directories excluded from dir for replication pur- poses. See the examples below. Sync synchronizes changes between replicas. Replicas are identified by the configuration files created by new. Before synchronizing, sync scans both file trees for changes unless flag -N is given. Scan can be performed separately by using the scan script. If any dir is supplied, relative to the top-dir of a replica, synchronization applies only to it. Sync flag -n performs a dry run to report changes between both replicas without synchronizing them (scan is still per- formed for both). The flag -l can be used to synchronize just the left replica (in command line order) with respect to the other. Flag -r does the same for the right replica. Flags -1 and -2 can be used to resolve conflicts in favor of the first replica (the left one) and in favor of the second one (the right one). When there are different conflicts to be gained by different replicas, one replica can be updated by hand, and then used as the prefered to settle down all the conflicts. REPL(1) REPL(1) EXAMPLE This defines for the system file tree, excluding /usr and /dist, a replica called a. Then we define another replica called b for a laptop. ; repl/new /dist/sys a /root /usr /dist replica /dist/sys defined. ; repl/new /dist/laptop b /fossil /usr /dist replica /dist/laptop defined. Synchronice the laptop resolving any conflict in favor of the system ; repl/sync -r1 /dist/sys /dist/laptop SOURCE /sys/src/cmd/repl SEE ALSO repl(8), replica(1). BUGS Append only files are not synchronized to prevent duplica- tion of file contents.