| APPLYLOG(8) | System Manager's Manual | APPLYLOG(8) |
applylog, updatelog - log-based updates
install/applylog [ -c ] [ -e ] [ -n ] [ -s ] [ -u ] [ -g ] [ -v ] [ -T timefile ] clientlog clientroot serverroot [ path ... ]
install/updatelog [ -p proto ] [ -r root ] [ -t now gen ] [ -c ] [ -x path ] log [ path ... ]
These two commands allow distribution of updates (eg, to the Inferno tree) based on a log of changes since a previous update. Notionally, one server system is the primary for a set of files, and one or more client systems maintain replicas of that set, although in some applications server and client might be the same machine.
Applylog is run on a client, to update the file tree rooted at clientroot. The server's version of the tree is rooted at serverroot on the client, typically by being mounted there (see bind (1)). Applylog takes the current state of the replica from the entries in clientlog, and applies a set of changes represented by log entries read from its standard input. Those entries are provided by the server. Each change is examined to see whether the file to which it applies is in the expected state. If so, the change is applied without comment; otherwise, there is a conflict caused by a local change to the replica tree independently from the primary. By default, applylog diagnoses the conflict and does not apply the change. It accepts the following options:
The scope of an update in a tree can be restricted to a particular set of paths listed on the command line. They should all be relative path names.
Updatelog is run on a server to produce a sequence of log entries representing changes to the primary tree since a previous log was produced. It can also be run on a client to see how its replica state differs from that recorded in a log. It accepts the following options:
By default, updatelog produces log entries describing changes, additions and deletions to all files in root but the scope can be limited by giving a different proto, explicitly listing trees to consider as paths on the command line, and by giving one or more -x options to exclude particular paths, in any desired combination.
A log file is a text file with one line representing each change to the tree. Each line has the form:
where:
/appl/cmd/install/applylog.b
/appl/cmd/install/logs.b
/appl/cmd/install/updatelog.b