🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #265539

Re: DIALOG settings.ini identity syntax section locations

#265539
From: wasbit
Date: Sat, 30 Apr 2022 17:39
250 lines
12172 bytes
"Bernd Rose" <b.rose.tmpbox@arcor.de> wrote in message
news:4e3uhxg2tbf6$.dlg@b.rose.tmpbox.news.arcor.de...

> 40tude Dialog is completely self-contained. Some user scripts have been
> relying on absolute paths and therefore would need adjustment. Apart from
> this, the whole Dialog directory could be copied to whatever location 
> (even USB thumb drives) and successfully run from there.

I didn't know that Dialog could be copied without installing. Thank you.

> That said, Dialog /must not/ be installed or copied into an UAC protected 
> folder, like "C:\Program Files\". (It is possible to do so, but requires
> detailed manual adjustments.) A folder like C:\Portable\ would be okay.

Mine is in c:\dialog

> Because of its portability, you can restore Dialog from a backup copy by
> simply deleting or renaming the folder of the defect installation and
> copying the backup folder with its subfolders to the old and new location.

Good to know. That's easier. Just archive when it's not corrupted.
And then restore when it is.

> Do not mix parts of a backup into either a fresh or faulty installation
> or into a restored backup from another time! Although most files will not
> be problematic, settings.ini might and the whole content of the "data"
> subfolder /will/ result in faulty internal references.

My process has been mixing parts for years but always from an old archive
into a newly installed Dialog directory using all the old paths again.

With Dialog not running I return the archive files below in this order
Servers 
 servers.dat
Sigs
 sigs.dat
???
 alldsc.dss
Groups
 groups.idg
 groups.stg
 groups_sub.id
Groups per server
 {server}.gtl
Categories
 cat_{*}.cto
Addresses
 addrbook.dat
Mime-Types
 mimetype.txt
Headers
 xheaders.dat
Scripts
 {script}.ds
 {script}.cds
Dictionaries
 {*}.ady
 american.adm
 {*}_sp.adz
 ftr_sp.adz
 Spell.cfg
Settings
 settings.ini 

I'm not sure which of the dictionaries actually change as I don't know if
american.adm is actually updated when new words are manually added by me.

>> data contains most of the changes over time 
> 
> Data contains the whole Dialog group and article database. It /of course/ 
> changes continuously over time. CompactDatabase can be used to clear the
> folder of deleted content. (Deleting a message inside Dialog just sets an
> internal marker in the database, but does not really delete anything.) 
> If you encounter problems with articles in a certain group, you can delete
> all articles, unsubscribe and run a CompactDatabase. Afterwards you can
> re-subscribe and call SampleHeadersFormGroup (Online menu) to refill the
> group from server. I never had the necessity to do so since the beginning,
> though.

I don't need the grouplist nor any of the actual messages inside the groups
since they can be downloaded again from the servers (although I turn off
purging so I may lose some of the oldest messages in any given newsgroup).

>> and settings.ini can get corrupted (which was my most recent corruption).
> 
> Never had this, either. 

I shouldn't call it a corruption. It's more like I accidentally hit some
setting that just screws up everything inside of Dialog. The most recent
'something' was that I couldn't see messages that I knew were there.

They were hidden somehow. 
It happened all of a sudden so I don't know what caused that.

It could have been just a setting but when I re-installed Dialog and
brought over everything, including the settings.ini file, it did it again.

It only went away when I re-created the settings file from scratch.
Probably it was some arcane setting I accidentally set somehow.

> The only situation, where settings.ini is likely
> to get corrupted is by installing Dialog in an UAC protected folder.
> In such a case (if the setup did not receive certain manual adjustments), two
> settings.ini exist and sometimes cancel each other out. (Reading from one,
> writing to the other.) One settings.ini would be the one of the Dialog
> folder. The other resides in the VirtualStore inside the "C:\Users" tree.

It's in C:\dialog.

>>> For the data folder, keep the backups (at least the latest) after running
>>> CompactDatabase.
>> 
>> I don't really know how compacting affects being able to copy back at a
>> later date.
> 
> You /never/ *mix* the content of 2 "data" folders. 

But you have to if "something" inside the data folder got corrupted.
Don't you?

> Delete or rename the
> one to be replaced and copy the other from backup. It doesn't matter, if
> the backup has another CompactDatabase state. The various internal pointers 
> are self-contained inside "data". You just get an uncompacted state when
> restoring a copy of "data" created before (or by) CompactDatabase. Run
> CompactDatabase (again), and the database will (again) become smaller.

I rarely use compact so that's not a problem for me.

> By restoring an older version of "data" you (of course) loose all changes
> to the database that took place after creating the backup. But even if you
> are tempted to save some of these losses by mixing the backup with the most 
> recent version of data (corrupted or not). Do /not/ give in! The probability
> of the database /not/ getting corrupted this way is small. (Although any
> problems might manifest themselves much later.)

Something is corrupting Dialog every once in a while. 
Bringing back just some of the data files fixes it.
I do not know more than that.

>> Therefore I'm afraid to compact because I don't know if that makes it
>> compatible or not but the real problem with copying back the entire data
>> directory is I don't know which files got corrupted and they may be one of
>> those data files that I don't need to copy over. 
> 
> If a CompactDatabase runs successfully, the database should be intact.
> (At least intact enough to be used.) Therefore, either the backup of the
> uncompacted "data_oldXX" folder or a fresh backup copy of the compacted 
> "data" folder should be usable in later emergencies.
> 
> If only a certain group has problems, use the selective cleanup process 
> described above.
> 
> Be sure to also save everything else (not only the "data" subfolder), 
> whenever you add/change a server, an identity or the like. Otherwise
> you'd loose access to those parts of the database.

I archive the entire c:\dialog directory to a flash drive periodically.

>> How does compacting help in terms of copying back files later?
> 
> Apart from keeping the backup small, Dialog is not meant to be used as
> archive for huge amounts of messages. (Use Hamster or any other local
> Usenet news server for such a requirement.) The more messages are stored 
> inside the Dialog database (deleted or not), the longer takes each lookup.
> Long lookups increase the risk of sth. interfering, like an AV program
> suspicious of the long read time or certain database contents, a power
> outage, or any other reason.
> 
> Please note, CompactDatabase does not /compress/ the database files in 
> any way. It just removes deleted messages from storage and reorders the
> database structure according to your subscribed servers and groups.

Good to know that CompactDatabase is simply Throw-out-the-trashDatabase!

>> But what if the settings.ini file is what got corrupted?
> 
> UAC problems with 2 different settings.ini (see above) aside: If Dialog 
> worked well before closing, and it did not crash while closing, then your
> settings.ini should be okay to backup. (And to be restore later on, if 
> need should be.)
> 
> If you want to err on the cautious side: Keep /several/ backups from
> different times. Just be sure, these backups match your current server
> and identity settings. Otherwise any current or backup "data" folder 
> will not match.

I keep a few archives since they're small enough.
Maybe a few times a year is when I back it up, just in case.

>>>> As the last step of repopulating Dialog if I create an equal number of
>>>> dummy identities inside the Dialog GUI
>>> 
>>> This step should have also created the correct setting of IdentitiesCount 
>>> inside the [General] section.
>> 
>> I realized my mistake in concluding wrongly that the POSITION of the
>> identities mattered. It wasn't the position after all. It was that I was
>> unaware of the GENERAL section in settings.ini which required a manual
>> setting of the number of identities. That was all my fault. 
> 
> IdentitiesCount should never be set /manually/. 

Now you tell me! :()

> You either restore a
> complete settings.ini matching the current "data" subfolder. Then the
> IdentitiesCount and the identities themselves (aka their count as well 
> as their names) contained inside settings.ini should be okay. Or you
> create new identities inside the GUI. This step not only writes values
> into settings.ini, but also creates files and entries inside files in
> the "data" folder. Both are linked by the /name/ fields of each identity.
> Defining or altering an identity name, therefore, is /only/ possible in 
> the GUI.

That's why my process worked when I created dummy identities of equal
number as originally using the GUI and then I shut down Dialog and manually
edited the settings.ini to include in the same section the real identities.

But I shouldn't have to do that anymore now that I know I can just include
the entire set of identities in one step and then just manually change the
General section to update the count. Everything should still match.

> [Pointers from settings.ini into data]
>> I don't understand anything in that paragraph because I don't see any
>> folders that have anything to do with any identity (or even the number of
>> identities). 
> 
> The pointers are not human-readable. The names of the identities appear
> somewhere inside the file of the whole list of (news)groups and folders
> (= groups.stg). The position in this file is a pointer to the next files,
> where they are linked to (arbitrary) numbers, that link to the numbered
> database files. Within these files are other numbers, that point into
> the files containing any messages from and to these identities.
> 
> Conclusion: Never mess with single files, but backup the whole Dialog
> folder and all its subfolders. From "data" subfolder you can backup
> later copies (= always the /whole/ subfolder), as long as you didn't
> alter anything from server settings to identities. If you did, create
> a new backup containing everything.

Thanks. See above where I "messed with individual files."
It works. But maybe only because I was always lucky. 

I'll try the suggestion of copying the entire data directory back at the
next Dialog corruption but that won't work if the corruption is outside the
data directory. But I don't know where the corruption is of course. 
-- 
Regards
wasbit
Technical Details
Message-ID: <t4js8p$eac$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <t4enug$5vf$1@dont-email.me> <jj9ur27pmzkh.dlg@b.rose.tmpbox.news.arcor.de> <t4hrjd$7ri$1@dont-email.me> <11kgreixfjb9q$.dlg@b.rose.tmpbox.news.arcor.de> <t4j2lf$1kg$1@dont-email.me> <4e3uhxg2tbf6$.dlg@b.rose.tmpbox.news.arcor.de>

Show Full Headers
Complete Article Headers
Message-ID: <t4js8p$eac$1@dont-email.me>
Subject: Re: DIALOG settings.ini identity syntax section locations
Date: Sat, 30 Apr 2022 19:39:55 +0200
From: wasbit <wasbitREMOVE@hotmail.com>
References: <t4enug$5vf$1@dont-email.me> <jj9ur27pmzkh.dlg@b.rose.tmpbox.news.arcor.de> <t4hrjd$7ri$1@dont-email.me> <11kgreixfjb9q$.dlg@b.rose.tmpbox.news.arcor.de> <t4j2lf$1kg$1@dont-email.me> <4e3uhxg2tbf6$.dlg@b.rose.tmpbox.news.arcor.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.readers
Organization: A noiseless patient Spider
Lines: 250
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 30 Apr 2022 17:39:38 -0000 (UTC)
Cancel-Lock: sha1:4NtwSFr6nlIB5vVWxG9Q1ciu89k=
X-Mimeole: Produced By Microsoft MimeOLE V14.0.8089.726
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
Importance: Normal
X-Msmail-Priority: Normal