|
Post by Jo on Jan 25, 2021 19:52:43 GMT -5
I notice a lot of \$BACKUP\ files exceeding the defined RETPD-age and MinGens. My definition is: RETPD=99,MinGens=2,MaxGens=25.
Using the new CFGMaint, [ODEFAULT] contains:
BKPMAXGEN=25 BKPMINGEN=2 BKPRETENTION=99
There are directories containing dozens very old files (200 to 500 days).
With the new CFGMaint I exported [BDEFAULT] and I see a lot of blank lines: And some of my directories are missing in BDEFAULT. And I wonder, what the date in line#3 should be.
|
|
|
Post by George on Jan 26, 2021 9:53:07 GMT -5
Jo: Definitely something wrong there. A) it shouldn't have blank lines b) it should only have 1 date after the count line (which should count the lines between the count itself and the ========= line.
Have to investigate, haven't made changes to that code since it was released.
I'll get back.
George
|
|
|
Post by George on Jan 26, 2021 11:04:50 GMT -5
Jo: I believe I've spotted a problem, It was affecting me as well, but I don't personally use SPFLite Backup, so I didn't notice it. Also, I tend to blow away and recreate my CFG file regularly, which exaggerates the problem. The BDEFAULT table is supposed to provide a list of all the $Backup folders that have been created by the backup process. So that when Retention processing is done, it knows what folders have to be processed. Every time a new $Backup folder is created, it is added to the table. Well, that's how it was originally coded. But if the CFG is recreated and the BDEFAULT table starts over, the logic fails. If BACKUP finds the $Backup folder already exists, it didn't check to ensure the folder name was already in the table. So the Backup itself was done properly, but no Retention would ever be done on the folder since the folder name was not added. I've corrected that for the next release, but what to do with your BDEFAULT Table? I'd use CFGMaint as follows. - Run CFGMAINT -EXPORT BDEFAULT to get the exported BDEFAULT table
- Edit and correct the table
- a) Delete those blank lines
- b) Delete one of those timestamp lines, keep the latest
- c) If you know of $Backup folder names that are missing from the list, add them
- d) correct the count at the beginning to match the resulting number of lines (# lines following the count line up to but not including the ========= line.
- Save it.
- Run CFGMaint -IMPORT 'filename' (or leave filename off and select it via the OpenFile prompt)
As long as the CFG isn't re-created, this should allow the current version to work properly while I get a new version released.
George
|
|
|
Post by Jo on Jan 26, 2021 16:15:56 GMT -5
George, yes, it worked fine, thanks a lot !
|
|
|
Post by George on Jan 26, 2021 16:22:07 GMT -5
Jo: Good. A new version has been released with the fix included.
George
|
|
|
Post by Jo on Jan 27, 2021 6:54:11 GMT -5
v2.3.21026 works fine. Many old Backup files have been deleted. But still I feel, there are a few backup files left. For now, it's fine, thanks.
|
|
|
Post by George on Jan 27, 2021 9:58:43 GMT -5
Jo: Are these files in folders that are present in the BDEFAULT list? If not, just do another backup of some file in the folder to get the folder name added.
If they are, can you provide some details, like a DIR listing of the folder?
George
|
|
|
Post by Jo on Jan 27, 2021 18:57:59 GMT -5
George, yes, I recreated the BDEFAULT folderlist with all \$BACKUP-folders found on my C: and D: drive (used "dir D:\$backup /s /AD /b >> Import.txt"). There are 28 folders. The total number of Files in there is more then 1500 (including .STATE) and about 100 of them are too old and still there. No file exeeeds the MaxGens limit, so this part is ok. Here is a DIR listing of my smallest folder: There are 5 files, 2 of them are older then 99 days.
Jo
|
|
|
Post by George on Jan 28, 2021 11:34:28 GMT -5
Jo: Thanks for the list. I duplicated the conditions and tested. Of course it failed just as it did for you. Found it in the Retention logic. When testing for and discarding old backups it was doing so from the newest end of a list rather than the oldest end. A good fore-head smacker! If you want to try it I've attached a corrected version. George SPFLite23.exe (483 KB)
|
|
|
Post by Jo on Jan 28, 2021 19:34:31 GMT -5
George, installed the attached version, works fine. Started now on a new day, cleanup worked perfectly. Thanks
Jo
|
|
|
Post by George on Jan 29, 2021 11:40:22 GMT -5
Good: I read that few lines of code several times and 'walked' through it and it seemed perfect. Had to set up the test case and step through it in Debug before finally having the Aha! moment. Glad you reported it.
George
|
|