Prepend Old Piwik Data to Current Piwik Data

I’ve got a fresh Piwik install on its own server where everything is working after some GeoLocation issues. Everything is humming along nicely.

However, I have been collecting data for a few days. So I’d like to import the 2 years’ worth of data in my old Piwik database into the new one without losing the last few days in the new install. Is there a simple way to simply insert the rows from the old database into the new one? I tried that, but started getting errors in the dashboard, so I rolled back before attempting the insert.

I’m aware I could process old log files, but I am under the impression that’s doesn’t provide as much information as is gained by the JavaScript tracking. That will be my fallback if this idea isn’t possible.

If this has already been addressed elsewhere, please feel free to link me to that discussion and delete this thread - I was unable to find anything pertinent when I searched.

Thanks for your help.

Oh, and by the way, I’ve upgraded both to 2.11.

I still got some column count mismatches on a few attempts to INSERT IGNORE, though. On the conversions log table, if I remember correctly.

I found the SiteMigration plugin, and attempted to use it. I’m able to get the script running but then get an error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘referer_visit_server_date’ in ‘field list’

This doesn’t seem to make any sense because both Piwik installations are identical versions. I guess the database doesn’t remove obsolete columns? Can I remove them manually, or can the script be told to skip them?

Hi Sean

This bug will be followed up in this bug report: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'referer_visit_server_date' in 'field list' · Issue #8 · PiwikPRO/plugin-SiteMigration · GitHub

Thanks, Matt!