Post by Stefan on Oct 30, 2022 3:59:16 GMT -5
George,
I think there's "opportunity for improvement" in the way RETPD, MINGENS and MAXGENS work together and/or how they are described in the doc.
I thought I may be doing something wrong, because I have files with over a dozen backup generations that do not get cleaned up.
I think the Clean-up routine needs a tweak (see below).
What I wanted was to keep a minimum of 2 backups, and no more than 3 backups for any given file, regardless of how old they are.
Hence my profles specify AUTOBKUP ON and settings in OPTIONS GENERAL are: RETPD: 0 Minimum Gens: 2 Maximum gens: 3
Aside from having too many backup generations, I also note that the BACKUP command seems to have a liking for the number 6.
Given the above settings, if I use the BACKUP command to deliberately save another generation, it allows, and reports(!) up to 7 generations.
An eighth BACKUP request gives a message that the backup was taken and there are "7 generations available", (a result of the '...1 extra gen which is removed at the next evaluation').
Given the above settings, if I use the BACKUP command to deliberately save another generation, it allows, and reports(!) up to 7 generations.
An eighth BACKUP request gives a message that the backup was taken and there are "7 generations available", (a result of the '...1 extra gen which is removed at the next evaluation').
When I stop and restart SPFLite the next day, I'm back down to 6 generations.
Clearly, some cleanup does occur, but the number of files remaining still exceeds the MAX of 3.
Clearly, some cleanup does occur, but the number of files remaining still exceeds the MAX of 3.
I offer the following potential causes (in order of likelyhood) for these observations:
Clean Up: I believe the cleanup routine is case-sensitive, e.g: file ABC.rex is treated separately to Abc.REX. If a "live" file is renamed (even only cosmetically), it creates a set of 'orphan' backup files.
My RETPD setting: Use of RETPD = 0 effectively prevents the clean-up of 'orphan' backups for deleted, renamed, moved, etc files (via FM or external to SPFLite).
I see that the above combination of the three values is NOT actually mentioned in the documentation, but I think it should be, given that RETPD=0 impairs the clean-up process.
SPFLite Restarts: I often use Windows' SLEEP at the end of the day and hence SPFLite may not get restarted for several days. NOt sure what effect this may/may not have on proceedings.
A couple of other questions, if I may...
Do you rename or delete STATE files in the <HomeData>\STATE folder when FM is used to rename, delete or move the related 'data' file?
Is there any occasional/retrospective maintenance of that folder's content for 'orphan' STATE files whose 'data' file has been renamed, deleted or moved by external means (e.g: Windows Explorer)?
If not, should/could there be?