Older data lost after piwik update


I did a piwik/matomo update to a new version by cloning our previous installation to a new server and then upgrading it in order to keep our old piwik untouched as backup. Old server was debian 8 with mysql, new one is debian 9, also with mysql. Old Piwik was 2.17.1, new one is now 3.7.0.

After the migration I saw that all historical data older than 13 months was lost. First I thought that this is due to the option that old logs are deleted after 13 months, but all those logs were archived on the old piwik installation as well as on the new installation. Also the database on our new piwik contains all tables for example piwik_archive_numeric_2014_07 and piwik_archive_blob_2014_07 etc as it is on our old installation.

Though when I check visits on the WI I do not see any numbers for times where blob and numberic archives are definetly there. As of my understanding those tables are created when logs are archived and deleted, so those numbers should be there.

Am I wrong here and those archives are saved on another way or is there simply some kind of issue which causes that those visits are not shown anymore?

Thanks in advance for any kind of help,

I believe it has to do with the data processing/archiving of the reports. If you are sure that the logs exist, you could try to reprocess all the data using the below link -


This should help bring the data back to your reports.

1 Like

Keep in mind that if the logs don’t exist, this will permanently remove all your archives.

So no matter what you do, make a proper backup.

1 Like


Thank you for your replys!

Logs older than 13 months are definetly deleted, on old installation as well as on the new one. I still have the old database before migration which has all required data, since my old installation still exists without being touched in any way thanks to the clone I did.

On the old installation these logs were archived, and when I´m correct they are archived to the database. So when I do an update those archived data should still be there, but unfortunately it is not shown anymore.

Is it correct that “log_visit” basically contains all visits and when it is archived tables such as piwik_archive_numeric_* and piwik_archive_blob* are created containing these data in an accumulated format to save space?

EDIT: So basically the issue is why archived data seems to be lost after an upgrade!