Reprocessing usagestats in OJS3.0.2

Hi @ajnyga

  1. Actually you do not have to delete the data from the metrics table – the entries with the same log file name i.e. load_id column in the DB table metrics will be overwritten. When processing a file, the function _loadData is called (s. pkp-lib/PKPUsageStatsLoader.inc.php at ojs-stable-3_0_2 · pkp/pkp-lib · GitHub) that further calls $metricsDao->purgeLoadBatch($loadId) that removes all entries with that load_id. Thus, maybe double check that the file names are identical with the load_ids.
  2. Yes, remove them. But to be on the safe side, please make however backup of everything!!!
  3. The time limit is defined by your server, in the php.ini. Thus maybe to do it step by step or with a cron job where the time limit is not so strict?
  4. Yes, because of number 1 above, I think you could only reprocess just part of the log files.
  5. Hmmm… Here I am not sure :-\ I think only your base URL configuration in the config.inc.php has to correspond to the logged URLs in the log files.
  6. Are your plugin settings as wished, i.e. city and region? The GeoLite file goes to the usage statistics plugin folder in the pkp-lib, I think. Else, I think that’s it :slight_smile:

It would be best if you could test it all first on a test installation, but of course this would mean more work :-\

Best!
Bozana