I am using the access log import method for piwik analytics (rather than JS tracking) and I would like it to rotate the access log file (truncate it to 0 size, gzip the original and store it at some specified path) once the import has finished.
Is there a way to do it as part of the import process (some setting)? I could of course use a logrotate script, but I think there is going to be a time lag between the end of import process and the log file rotation, so some records (which will have been stored in the meantime) will be removed without having been imported.
I know AWStats has this option and has been rather useful (to us, at least).
Can you please advise me on it? I am on version 1.12.