Transaction Logger

The transaction logger is a subsystem designed to write file system updates to another device.

The changes are written to an internal queue. This queue is then written to a device, tape, or network by a dequeueing process run on a phantom line.

If the dequeueing process can keep up with the enqueueing of items by the users, then up to the second crash protection can be accomplished. Used with a file-save tape, all updates are recorded for restoration. If used with another machine, it can provide a hot backup.

startlog on the primary machine and tlog-restore on the secondary machine provides the basic functionality for hot backups.

Transaction Log is a menu available to help manage the transaction logger. It can start and stop the dequeueing process as well as filter data going into the queue. All files can be logged or only files with an l in attribute one.

set-dptr is a command that can change a D-pointer or all D-pointers in an account to add or remove the l from attribute one. If only dl type files are being logged then a normal create-file does not cause a create-file on the backup machine. So, changing the D-pointer to dl later does not cause a create-file either. This is part of the design and should be noted.

A device must be attached to the port that is starting the dequeueing process. The transaction logger steals the device and begin dequeueing to it. The logger runs on a phantom process, usually the last one, right before the scheduler.

When a stoplog is entered, the current reel on the dequeueing device is terminated with a file mark and a t-det is executed by the dequeueing process. It remembers which tape device it was using, but now this device is free. The next startlog entered re-attaches the tape and increments the reel number.

Each reel in a transaction log dequeue session is independent and can be restored from TCL one after the other or separately.

A list of devices is available to choose from. To cause the startlog command to display this list, detach all the tape devices prior to invoking startlog.

Between stoplog and the next startlog, a new reel must be inserted if not doing hot backups.

Example(s)

This sequence allows all updates to the invoices file to be enqueued for writing to the SCT drive.

set-dptr +l invoices (f

invoices : D -> DL

invoices : D -> DL

set-sct

Block size: 16384

[1709] Tape device is assigned to med density (150M) quarter inch tape (SCT).

startlog

Activate transaction logger (y/n)?y

[607] Transaction logger started.

This command writes a file mark on the tape and releases it from the transaction logger, t-det. Updates are enqueued automatically. This is reel one.

stoplog

[602] The transaction logger is disabled.

This restarts the logger to the SCT drive on behalf of reel two.

startlog

[607] Transaction logger started.