daleske@cbdkc1.UUCP ( John Daleske x4335 3S324W RAA) (09/05/86)
Recently our machine had the occasion to lose a number of days of news. The uucp link between cbdkc1 and cbatt had been inadvertently broken by our system administrator. I didn't realize it until four days later since it happened just before a weekend. I decided to try to get the history files of the two machines into sync by developing a series of steps. Ultimately these steps could likely be made intelligent enough be put into an automatic script. These commands were established for UNIX System V. I realize that the BSD folks have some commands and other commands provide similar features. I'll leave the development of a BSD script to someone who can actually try it. ------- Assume machine A is up-link from machine B and you have a login on both. Machine B is the one which had not received the news for a while. uuto /usr/lib/news/history to machine A and name it Bhistory. cp /usr/lib/news/history of machine A to Ahistory. (At this point I pared down Ahistory because it was somewhat larger than my history file, having retained the history for a lot longer.) sort -oA1 Ahistory # With intention of using Ahistory format for 'join' cut -f1 A1 > A2 # Pulls the Message-ID field cut -f1 Bhistory > B1 sort -oB2 B1 # A1 A2 and B2 are now all sorted by Message-ID. comm -23 A2 B2 > m1 # Find the difference between A2 and B2. join A1 M1 > missing # Using the sorted missing Message-ID fields pull # the complete lines from the sorted Ahistory. cut -d" " -f5 missing > articles # Note that "-f5" means field 5. # My 2.10.2 version used f5. cbatt history file had the group-message# as # field 4. Just check your history file sed -e 's+\.+/+g' articles > artfiles # Convert article "." to file "\". I then split this list of relative path names into reasonably small groups. Each path name refers to one article which needs to be sent. I ran each group through 'batch' putting the output into separate files which I uuto'd back to the machine need the news. Once they arrived I fed them into 'rnews' slowly so as not to overly load the machine during the day. ___________________________________________________________________________ John Daleske Columbus, Ohio. 614-860-4335 | Default disclaimer... UUCP: {ihnp4,cbosgd,desoto}!cbdkc1!daleske | ____________________________________________|______________________________ "Now," said the butterfly, "look closer and tell me what you see." "I see a tiny horse with wings upon its back" said Flutterby. "Why that's me I see! But what am I?" "You are you. Just as I am me!" said the wise old butterfly. "Nothing more, nothing less."