With version 5.x of DNEWS you can now use a cyclic database, this has several advantages over the current system, please read this entire page carefully before converting, it is possible to loose existing news if you do the conversion incorrectly, in particular ensure you have a pile defined to store long term groups (e.g. local news groups).
Advantages:
Disadvantages:
We believe the advantages far far out weigh the disadvantages so these new expire rules are now the default for new installations of DNEWS.
Normally DNEWS stores items in buckets, e.g. db_23.itm, each bucket is about 10MB, when you switch to the new system DNEWS adds on the PILE number, up to 30 piles can be defined normally four or five should be enough. The bucket files are then called db_23_nn.itm where 'nn' is replaced by the pile number.
You can specify for each pile, a wildcard list of groups, and a percentage of the entire spool area that can be used for that pile, if the usage ever grows above this percentage then the oldest bucket will simply be deleted. There is still a nightly expire process as DNEWS still needs to modify the indexes but this is very fast.
To convert your existing database to the new format you should do the following:
Note: During the rebuild_piles your server won't accept incoming newsfeeds and will display some odd messages in the log file which can usually be ignored, wait until the rebuild_piles finishes before panicking :-)
There is a FAST conversion method that avoids the rebuild_piles step, but it only works
if you are happy with your existing news all being placed in a single pile, (pile 1) and
then expiring as required by that rule, so you wouldn't want to do this if you had
local groups that must be kept for more than a few days.
Warning: This fast conversion method will delete old items in local groups, so
you may not want to do this, if you have long term local groups, then use the slow
conversion method above!!!!
Here's what you do:
Done, it should then be working, and tellnews showpiles should show all current data is
in pile 1, and incoming news will get placed in the correct piles. And news should be
readable, if you are running dmulti you must restart dnews so the slaves notice whats gone
on.
Then over the next 2-3 days reduce the size of pile 1 and increase the other pile sizes
respectively.
As the pile a news item is in is chosen when the item arrives, you cannot simply change the expire rules and expect currently stored items to expire faster or slower, and more importantly you cannot change the pile numbers without disasterous affects (e.g. swapping pile 1 and pile 2 around).
You can safely change the 'use %' or 'days' for any existing pile, and you can safely add piles.
If you really want to affect existing piles, then the trick is to run the tellnews command 'rebuild_piles' after modifying the expire.conf values and doing a reload. However this can take upto about 1 hour per gig of news to complete.
As buckets now have the PILE number in the name you can backup that part of the dnews database, for example with the following expire.conf sample below you could backup the local.* newsgroups with a command like this:
copy (spool_directory)\db_*_3.itm \backup
The new format of rules in expire.conf is:
pile n [use xx%] [days nn] groups wildcard_list
use = The percentage of your 'diskspace*' as defined in dnews.conf to use for this pile
days = The number of days to store items in these groups
groups = The wild card list of newsgroups to store in this pile
If the 'use' or 'days' rule is exceeded, then the oldest buckets (10mb files) for that
pile are deleted until the rule is satisfied.
e.g.
pile 1 use 40% groups * pile 2 use 40% groups *binaries*,*pictures*,*warez* pile 3 days 30 groups local.* pile 4 use 1% groups control* remember 3
The LAST matching PILE is used, so specific rules should be at the END of the expire.conf file.
You MUST change local.* to match the names of your local groups if you want them stored for more than a few days.
Using version 5.0, do these steps:
| Products | Downloads | Prices | Support | Company |
|---|---|---|---|---|