Backing up and moving archive tables

Hey there

I’m in the process of transferring all data for a single site, from one Matomo instance to another. We cant’t use log data for the process, as we keep only the last week in the DB (we accumulate ~100GB per week on log tables), so I have to work with the archive tables.

In short, we dump the archive tables using a where clause for the site, and then in the other database we restore that data by inserting it row by row in the destination archive tables.

The problem is the dashboard and reports do not recognize this new information, showing only ‘there is no data for this report’.

Is there something we are missing in this process?
If you can point me in the right direction for handling the archive data, it would be great!

Thanks!

For anyone trying to move archive data, maintaining consistency between idarchive, name, idsite, period and date is key to get the destination Matomo instance to recognize the old archive data.

For instance, if you have the following rows in the original instance:

idarchive,name,idsite,period,date
234,nb_visits,24,1,2017-06-01
234,bounce_count,24,1,2017-06-01

In the destination instance you can change idarchive, but you have to keep it consistent across columns:

idarchive,name,idsite,period,date
7546,nb_visits,1,1,2017-06-01
7546,bounce_count,1,1,2017-06-01