ini corruption fallback?
-
- Posts: 495
- Joined: Thu Dec 15, 2016 9:44 pm
ini corruption fallback?
I have had a corrupted ini file, I saw when opened in Notepad2 it was filled with NUL; I lost all my preferences.
I'm not sure if this was actually Everything's fault as I think an unrelated drive was a bit wobbly and closure never completed so I had to hold the off button down.
But I'll have to gradually think what some of my customisations were.
* I wonder if this situation could be guarded against in some simple way? My thought is that whenever any of the ini or csv files are written, they could name out the previous one as a backup (e.g.(filename).bck), so it can use that for recovery in the case of corruption - a corrupted file could be detected on load and the backup automatically utilised (with a popup saying this has happened). Aside from detecting if the ini is abnormal there could be an MD5= or equivalent as the final line as a checksum or MD5=(blank) to generate no warning for those who want to update the file externally. I would think in the case of csv the normal lines would be discriminatable by having commas and double quotes in them which the MD5 line would lack.
David
I'm not sure if this was actually Everything's fault as I think an unrelated drive was a bit wobbly and closure never completed so I had to hold the off button down.
But I'll have to gradually think what some of my customisations were.
* I wonder if this situation could be guarded against in some simple way? My thought is that whenever any of the ini or csv files are written, they could name out the previous one as a backup (e.g.(filename).bck), so it can use that for recovery in the case of corruption - a corrupted file could be detected on load and the backup automatically utilised (with a popup saying this has happened). Aside from detecting if the ini is abnormal there could be an MD5= or equivalent as the final line as a checksum or MD5=(blank) to generate no warning for those who want to update the file externally. I would think in the case of csv the normal lines would be discriminatable by having commas and double quotes in them which the MD5 line would lack.
David
Re: ini corruption fallback?
A Everything-backup.ini is on my TODO list.
Everything will then treat text/plain files with NULs as invalid and fall back to the backup.
Thanks for the suggestion.
For now, please make sure Windows shutdowns gracefully or try storing your settings and data on a different drive.
Everything will then treat text/plain files with NULs as invalid and fall back to the backup.
Thanks for the suggestion.
For now, please make sure Windows shutdowns gracefully or try storing your settings and data on a different drive.
-
- Posts: 495
- Joined: Thu Dec 15, 2016 9:44 pm
Re: ini corruption fallback?
Thanks - I'll certainly keep an occasional backup if I can until it comes into place.
I also found after that Everything was useful for spotting corrupted images - I did an extension search and a sort by (or filter for lack of) bit depth, and the corrupted ones show a blank. I found a few spread over 2 decades.
I see there are a few content type columns that might be useful for spotting corrupted files generally in the filesystem, though I'm not certain for sure - renaming a .7z file as .txt didn't throw up any information that indicated the content was binary. I'll have to have a play around with them to see the best way to do it, and maybe spot if there are any freeware programs. But it would be quite nice to have a simple in-Everything way of spotting possible file corruption from the opening/closing headers.
d
I also found after that Everything was useful for spotting corrupted images - I did an extension search and a sort by (or filter for lack of) bit depth, and the corrupted ones show a blank. I found a few spread over 2 decades.
I see there are a few content type columns that might be useful for spotting corrupted files generally in the filesystem, though I'm not certain for sure - renaming a .7z file as .txt didn't throw up any information that indicated the content was binary. I'll have to have a play around with them to see the best way to do it, and maybe spot if there are any freeware programs. But it would be quite nice to have a simple in-Everything way of spotting possible file corruption from the opening/closing headers.
d
Re: ini corruption fallback?
My way to reduce problems with long time undetected file corruption.
I make ZPAQ based backups into one archive for my portable Everything installation.
This excludes the database, of course.
ZPAQ's deduplicating reduces the size of this archive, so only changed blocks are added with each backup.
This way, I have hundreds of versions available, for every file.
The typical backup contains only the ini file and all changed *.csv files,
but from the same archive, I can extract every version of the Everything.exe file from the past.
I make ZPAQ based backups into one archive for my portable Everything installation.
This excludes the database, of course.
ZPAQ's deduplicating reduces the size of this archive, so only changed blocks are added with each backup.
This way, I have hundreds of versions available, for every file.
The typical backup contains only the ini file and all changed *.csv files,
but from the same archive, I can extract every version of the Everything.exe file from the past.
-
- Posts: 495
- Joined: Thu Dec 15, 2016 9:44 pm
Re: ini corruption fallback?
I'm slightly less worried about the Everything ini corruption in this instance as it's recreatable with a little effort. More about if one file got corrupted, then what other files might have I did find one such.
Mostly I keep lots of backups, and any important files I change a lot I end up with lots of timestamped file versions which I clear out. The problem lies with spotting corruption in main files and images where that's not the case, i.e. where I'm not constantly updating them, such as images.
My plant images get moved around on a massive scale, which file structure all needs preserving. My tendency nowadays is as well as a normal backup (FreeFileSync nowadays) to have at least one further backup that's simply an incremental unstructured file aggregation which I add new images to as I get them off my camera card, along with an Export of an Everything search so in theory they can all be moved back to their proper places by detecting their size/time and looking at their tree position in the Everything export.
My tendency is to have the latter stored on a number of 500GB which are cheap on eBay so I don't have all my eggs in one basket. My impression also is that these smaller drives with lower data density seem to last longer than the large (eg 4GB) capacity drives available nowadays, perhaps due to their tricks of storage in less and less space. By contrast, failure of one 4GB backup tends to lose quite a lot.
I'll check out ZPAQ. I note the wikipedia says it detects changes by the modified stamp which doesn't sound helpful for corruption unrelated to a save.
I should also use WinMerge more to check things match up.
David
Mostly I keep lots of backups, and any important files I change a lot I end up with lots of timestamped file versions which I clear out. The problem lies with spotting corruption in main files and images where that's not the case, i.e. where I'm not constantly updating them, such as images.
My plant images get moved around on a massive scale, which file structure all needs preserving. My tendency nowadays is as well as a normal backup (FreeFileSync nowadays) to have at least one further backup that's simply an incremental unstructured file aggregation which I add new images to as I get them off my camera card, along with an Export of an Everything search so in theory they can all be moved back to their proper places by detecting their size/time and looking at their tree position in the Everything export.
My tendency is to have the latter stored on a number of 500GB which are cheap on eBay so I don't have all my eggs in one basket. My impression also is that these smaller drives with lower data density seem to last longer than the large (eg 4GB) capacity drives available nowadays, perhaps due to their tricks of storage in less and less space. By contrast, failure of one 4GB backup tends to lose quite a lot.
I'll check out ZPAQ. I note the wikipedia says it detects changes by the modified stamp which doesn't sound helpful for corruption unrelated to a save.
I should also use WinMerge more to check things match up.
David
Re: ini corruption fallback?
(See also, zpaqfranz.
I've not used zpaq nor zpaqfranz, yet.
ARJ [dated, though I use it] also has the concept of "chapters" (multiple copies of changed files), but it does not do dedup or anything like that.)
See also, Finding corrupt office files with Everything, identifying duplicates from checksums.
(I thought ? there was another thread here about "silent corruption"?
PS: date/time is not a valid way to check for corruption.)
I've not used zpaq nor zpaqfranz, yet.
ARJ [dated, though I use it] also has the concept of "chapters" (multiple copies of changed files), but it does not do dedup or anything like that.)
See also, Finding corrupt office files with Everything, identifying duplicates from checksums.
(I thought ? there was another thread here about "silent corruption"?
PS: date/time is not a valid way to check for corruption.)
-
- Posts: 687
- Joined: Wed Jun 01, 2022 5:01 pm
Re: ini corruption fallback?
I always make a copy of changed settings of any programmeteorquake wrote: ↑Wed Jul 19, 2023 7:32 pm I have had a corrupted ini file, I saw when opened in Notepad2 it was filled with NUL; I lost all my preferences.
[...]
Some of this is kind of automated [and could be made further if I only invested time in it] but the best and time effective way is to use as many portable versions of programs as possible and to backup just your entire folder storing all of them [thus also all of those various CFG and INI files
Re: ini corruption fallback?
That also assumes that the date/time (& or size) did in fact change.The idea here is to have copies of all versions from the past.
So you have a chance to get an intact version of the corrupt file.
With silent corruption, that likely will not be the case.
Re: ini corruption fallback?
One benefit of ZPAQ is that it uses SHA checksums for its blocks to make the de-duplicating.
These checksums will detect when file content is corrupt, but date/time and size are not changed.
If the current version of a file makes problems, there are many old good versions
because I make of course also a backup after changing settings.
I never had corruptions, but many times I just wanted an old behavior back.
Re: ini corruption fallback?
I finally lost my settings to a bluescreen.
My Everything.ini was half filled with NULL characters.
Everything 1.5.0.1362a adds settings and data backups.
My Everything.ini was half filled with NULL characters.
Everything 1.5.0.1362a adds settings and data backups.