chriselswede / hanacleaner

A house keeping script for SAP HANA
76 stars 44 forks source link

Cleanup of Backup Catalog #38

Open stephane0606 opened 1 year ago

stephane0606 commented 1 year ago

Hi,

I tried to clean up Backup Catalog and I got the following error : Please do not use -br true or -bo true if your backup catalog is larger than 100000 entries!

Why is there a limitation of the number of entries to delete ? Is there a workaround ?

Stalinpanicker commented 1 year ago

Hi Stephane,

There is no restriction to clean the number of entries. The "-br" or "-bo" just prints the entries that will be deleted before / after catalog cleanup OR the total removed entries. This message is thrown keeping in mind the unnecessary number of entries that will be printed on your screen or the crontab logs if any.

Having said that, you may omit using these flags and use others to clean the catalog, and if the cleaned catalog has entries <10000, you may resume using these flags in next runs.

Do let me know if this helps.

Regards, Kartik

stephane0606 commented 1 year ago

It did not help. After checking the code, there a count and if number > 100000 entries then exit.

if nCatalogEntries > 100000: log("INPUT ERROR: Please do not use -br true or -bo true if your backup catalog is larger than 100000 entries!", logman, True) os._exit(1)

So I have clean up the backup catalog manually to get less than this number.

Regards. Stephane M.

Stalinpanicker commented 1 year ago

Hi,

Gotcha, seems in the code this is a check in place to stop processing any catalogs > 10000 entries in size. Well, next time, can you pass -br & -bo with 'false' as input ? My wild guess is that should suppress it - looking at the func clean_backup_catalog arguments.

Can you please try that once and share me the result ?

Regards, Kartik

Stalinpanicker commented 1 year ago

Appreciate if I can hear back from you on the above remedy.

stephane0606 commented 1 year ago

Hi,

unfortunatly , as from now only one HANA DB had a huge backup catalog. I will check in others landscape if I can found another large number of entries.

Stalinpanicker commented 1 year ago

Hi Stephane,

Sure, thanks for the revert. It will be interesting to see if that helps.

Regards, Kartik