Reprocessing usageStats logs that no longer exist

I changed the setting of Usage Stats to not log City and Region, but I just have the logs from after 2016. How can I “reprocess the logs” from before 2016 that I no longer have?

OJS 2.4.8.3

You’ll need either the OJS logs or the Apache logs for the period in question in order to reprocess them.

With a bit of analysis and effort it might be possible to collapse existing stats to remove the city and region, but I don’t know off the top of my head if OJS natively record the “roll-up” rows in the metrics table or not. If it does, you could simply (and carefully) delete the old rows from the old data, without reprocessing the logs.

1 Like

That is exactly what I thought when I posted. Maybe someone already had done this before and know of some SQL “magic” to do it.

What do you mean “roll-up”?

It is possible the metrics are represented as (simplified):

Month Year Region Article Count
02 2016 Americas 65 3
02 2016 Europe 65 12
02 2016 Asia 65 5

But I think there is likely a “roll-up” row for all regions:

Month Year Region Article Count
02 2016 Americas 65 3
02 2016 Europe 65 12
02 2016 Asia 65 5
02 2016 65 20