Fill gap by importing Apache logs?

We have a 20-day gap in our Piwik data, caused by a user error (mine) over-tightening our web server security. I’ve checked the piwik_log_visit table in the database and the data is definitely missing.

We have the Apache logs for the missing days, so I’m hoping to import those 20 log files to fill the gap.

I’ll back up the database first of course. I thought of deleting overlapping entries from the first and last Apache log files so that the time span of the imported data matches our Piwik downtime exactly.

Will this work? Anything else I should watch out for?

The amount of data isn’t huge, just 4 low-traffic sites.

Sounds good, make sure you use: Log Analytics - Analytics Platform - Matomo

Thanks Matt.

I’d read the relevant documentation, but is suggests I should “record data for each technique in a separate website in Piwik” if using both Log files and Javascript tracking.

Presumably I can ignore this advice as there won’t be any time overlap between the two techniques in the data?

cheers, Steve