1 03/26/85 move_log_segments
 2 
 3 Syntax as a command:  move_log_segments log-name from-dir to-dir cutoff
 4 
 5 
 6 Function:  moves log segments from one directory to another, updating
 7 the previous log information in the log segment headers so that the log
 8 tools (print_sys_log, summarize_sys_log) will continue to find the
 9 moved log segments.  Because it is necessary to update log segment
10 headers, this command must be used to move log segments; using the move
11 command will cause the segments to become unlocatable.
12 
13 
14 Arguments:
15 log-name
16    is the name of the log whose segments are being moved.  This should
17    be the entryname of the first segment in the log (e.g.  log,
18    admin_log, dm_system_log, syserr_log); it must not be a pathname.
19 from-dir
20    is the directory in which to look for segments to move.
21 to-dir
22    is the directory to which to move the segments.
23 cutoff
24    is a time value specifying which logs are to be moved.  All log
25    segments whose messages are all dated before the cutoff are moved.
26    See the Multics Programmer's Reference Manual, Order No.  AG91, for
27    a description of valid time string values.
28 
29 
30 Notes:  Old log segments are identified by a timestamp suffix
31 (YYYYMMDD.HHMMSS), which identifies the time of the latest message in
32 the log segment.  This suffix is tested against the cutoff time, and if
33 it is earlier than the cutoff, the log segment is moved.
34 
35 A history directory must contain at least one segment; even if the one
36 remaining segment is earlier than the cutoff, it will not be moved, in
37 order to keep the chain correct.  Thus, a cutoff of the current time
38 can be used to move all but the most recent log segment into another
39 directory.
40 
41 
42 Notes on history directories:  An arbitrary number of history
43 directories can be maintained; for instance, one for the current day's
44 logs, one for the previous week's, and one for the previous month's.
45 This allows logs to be distributed onto various storage media, perhaps
46 placing older logs on a demountable volume, or even on tape.
47 
48 Because log segments are self-identifying (from the suffix), they can
49 be placed on tape and later retrieved selectively into a history
50 directory; the print_sys_log command will still be able to find them if
51 that history directory is in the chain.