MAKEHISTORY(8)
π makehistory β InterNetNews Documentation, section 8 π
β¨ NAME β¨
makehistory β initialize or rebuild the INN history database. π
π SYNOPSIS π
makehistory [-abFIOSx] [-f filename] [-l count] [-L load-average] [-s size] [-T tmpdir]
π¦ DESCRIPTION π¦
okay so makehistory is the bestie that rebuilds the history(5) text file. That file is literally the list of message-IDs of articles the server has already seen. It can also rebuild the overview database. π
Note: even thoughmakehistoryalso rebuilds thedbzindices for the history file, itβs still useful to runmakedbz(8)aftermakehistory(8)to improve the efficiency of the indices. Why? Becausemakehistorydoesnβt know how large to make the hash table at first run, unless the size is given by the-sflag. π«Ά
The default location of the history text file is pathdb/history; to specify an alternate location, use the -f flag. β¨
By default, makehistory will scan the entire spool, using the storage manager, and write a history line for every article. To also generate overview information, use the -O flag. π
If a malformed article is found in the news spool, in a way which prevents its integration into the history or overview data, a log line will be output and the malformed article will just be skipped. No drama, just skipped. π
π OVERVIEW REBUILD π
WARNING: If youβre trying to rebuild the overview database, be sure to stop innd(8) and delete or zero out the existing database before you start for the best results. An overview rebuild should not be done while the server is running. Unless the existing overview is deleted, you may end up with problems like out-of-order overview entries, excessively large overview buffers, and the like. π
If ovmethod in inn.conf is "ovdb", you must have the ovdb processes running while rebuilding overview. ovdb needs them available while writing overview entries. You can start them by hand separate from the rest of the server by running ovdb_init; see ovdb_init(8) for more details. πΈ
Similarly, if ovmethod in inn.conf is "ovsqlite", you must have the ovsqlite-server process running while rebuilding overview. See ovsqlite-server(8) for more details and how to start it by hand. π¦
Rebuilding overview data is as straight-forward as:
- Checking that the configuration file of the new overview storage method is present in
pathetcand fits your needs (buffindexed.conf,ovdb.conforovsqlite.conf). Note that thetradindexedoverview storage method does not have a dedicated configuration file. - Making sure that INN is stopped (
"rc.news stop"as the news user, or whichever command youβre using). - Setting the new overview storage method in the
ovmethodparameter ininn.conf. - Making sure that the directory specified by the
pathoverviewparameter ininn.confexists and is empty (or contains freshly created buffindexed buffers, if using that overview storage method). Otherwise, rename the current directory (to backup existing overview data) and re-createpathoverviewas the news user. - Starting
ovdb_initorovsqlite-serveras the news user if the new overview storage method is respectivelyovdborovsqlite. - Running
"makehistory -O -x -F"and waiting for the command to finish. (You may notice a few logs about articles for which overview data cannot be inserted into the new overview storage method. As long as there arenβt tons of them, it is normal, notably because there is an internal limit in the length of overview data generated bymakehistory, contrary toinnd. Unfortunately, these rare articles wonβt be present in the new overview.) - Stopping ovdb or ovsqlite helper programs if you started them during the previous steps (running
"rc.news stop"as the news user will stop them; do not mind the messages related to the fact that the news server was not running). - Starting INN and checking the logs to make sure everything is fine. You will normally notice that the
activefile is renumbered (rc.newstakes care of that when run after an overview rebuild; otherwise, manually run"ctlinnd renumber ''").
π₯ OPTIONS π₯
-aβ Append to the history file rather than generating a new one. If you append to the main history file, make sureinnd(8)is throttled or not running, or you can corrupt the history. π-bβ Delete any messages found in the spool that do not have validMessage-IDheader fields in them. π§Ή-Fβ Fork a separate process to flush overview data to disk rather than doing it directly. The advantage of this is that it allowsmakehistoryto continue to collect more data from the spool while the first batch of data is being written to the overview database. The disadvantage is that up to twice as much temporary disk space will be used for the generated overview data. This option only makes sense in combination with-O. With buffindexed, theoverchanprogram is invoked to write overview. π-f filenameβ Rather than writing directly topathdb/history, instead write to filename, also inpathdb. β¨-Iβ Donβt store overview data for articles numbered lower than the lowest article number inactive. This is useful if there are for whatever reason old articles on disk that shouldnβt be available to readers or put into the overview database. π-l countβ This option specifies how many articles to process before writing the accumulated overview information out to the overview database. The default is"10000". Since overview write performance is faster with sorted data, each βbatchβ gets sorted. Increasing the batch size with this option may further improve write performance, at the cost of longer sort times. Also, temporary space will be needed to store the overview batches. At a rough estimate, about300 * countbytes of temporary space will be required (not counting temp files created bysort(1)). See the description of the-Toption for how to specify the temporary storage location. This option has no effect with buffindexed, because buffindexed does not need sorted overview and no batching is done. π-L load-averageβ Temporarily pause activities if the system load average exceeds the specified level load-average. This allowsmakehistoryto run on a system being used for other purposes without monopolizing system resources and thus making the response time for other applications unacceptably slow. Usingnice(1)does not help much for that because the problem comes from disk I/O usage, andionice(1)is not always available or efficient. π΄-Oβ Create the overview database as well as the history file. Overview information is only required if the server supports readers; it is not needed for a transit-only server (seeenableoverviewininn.conf(5)). If you are using the buffindexed overview storage method, erase all of your overview buffers before runningmakehistorywith-O. π-Sβ Rather than storing the overview data into the overview database, just write it to standard output in a form suitable for feeding tooverchanlater if wished. When this option is used,-F,-I,-l, and-Tare ignored. This option only makes sense in combination with-O. π-s sizeβ Size the history database for approximately size key-value pairs (i.e. lines in history). Accurately specifying the size is an optimization that will create a more efficient database. (The size should be the estimated eventual number of articles, typically the size of the old history file, in lines.) By default,makehistorywill create a database optimized for handling about6,000,000articles (or500,000if the slower tagged hash format is used). This size does not limit the number of articles the news server can store in its history file. It will just get slower when that optimal size is exceeded, until the next run ofnews.dailywhich will appropriately resize it. π-T tmpdirβ If-Ois given,makehistoryneeds a location to write temporary overview data. By default, it usespathtmp, set ininn.conf, but if this option is given, the provided tmpdir is used instead. This is also used for temporary files created bysort(1)(which is invoked in the process of writing overview information since sorted overview information writes faster). By default,sortusually uses your system temporary directory; see thesort(1)man page on your system to be sure. ποΈ-xβ If this option is given,makehistorywonβt write out history file entries. This is useful mostly for building overview without generating a new history file. π«
π EXAMPLES π
Hereβs a typical example of rebuilding the entire history and overview database, removing broken articles in the news spool. This uses the default temporary file locations and should be done while innd isnβt running (or is throttled). π
makehistory -b -f history.n -O -l 30000 -I
This will rebuild the overview (if using buffindexed, erase the existing overview buffers before running this command) and leave a new history file as "history.n" in pathdb. To preserve all of the history entries from the old history file that correspond to rejected articles or expired articles, follow the above command with:
cd <pathdb>
awk 'NF == 2 { print }' < history >> history.n
(replacing the path with your pathdb, if it isnβt the default). Then look over the new history file for problems and run:
makedbz -s `wc -l < history.n` -f history.n
Then rename all of the files matching "history.n.*" to "history.*", replacing the current history database and indices. After that, itβs safe to unthrottle innd. π«Ά
For a simpler example:
makehistory -b -f history.n -I -O
will scan the spool, removing broken articles and generating history and overview entries for articles missing from history. β¨
To pre-size the history file for 100,000,000 articles, and generate overview data at the same time, you may directly use the following command:
makehistory -O -s 100000000
You then do not need running makedbz as the history file has already been generated and optimized for the expected number of articles. π
To just rebuild overview:
makehistory -O -x -F
ποΈ FILES ποΈ
pathdb/historyβ This is the default output file formakehistory.pathtmpβ Where temporary files are written unless-Tis given.
π HISTORY π
Originally written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews and updated by various other people since. π
β¨ SEE ALSO β¨
okay bestie, you made it to the end, and this is the part where the page hands you a whole little friend group of other manual pages π«Ά like, these are the ones you'll probably want to pull up next, so go ahead and man them (iykyk):
active(5)β theactivepage, section 5 πctlinnd(8)β thectlinndpage, section 8, she's right there waiting for you β¨history(5)β thehistorypage, section 5, lowkey the sibling of everything you just read πinn.conf(5)β theinn.confpage, section 5, config vibes πΈinnd(8)β theinndpage, section 8 πlibinn_dbz(3)β thelibinn_dbzpage, section 3, library territory π¦makedbz(8)β themakedbzpage, section 8, literally in the name πovdb_init(8)β theovdb_initpage, section 8 π₯overchan(8)β theoverchanpage, section 8 πovsqlite-server(8)β theovsqlite-serverpage, section 8 β
no cap, that's the whole list β every single one, not skipping a single entry, because we don't do that here π
and that's a wrap on MAKEHISTORY(8) fr fr π thank you for reading all the way to the bottom, you absolute main character. this whole beautiful thing is INN 2.7.4, dated 2024-05-19 β screenshot it, cite it, print it out and put it on your wall, whatever feels right π§π periodt.
π¦ where this page comes from
- arch rolling: inn 2.7.4-4 Β· ISC
- epel 10: inn 2.7.4-5.el10_3 Β· ISC AND BSD-3-Clause AND BSD-4-Clause AND FSFAP AND (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-3.0-or-later WITH Bison-exception-2.2 AND LicenseRef-Fedora-Public-Domain AND MIT AND NTP
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms