PiwikPRO / plugin-SiteMigration

Migrate websites and website data between two Piwik installations
17 stars 3 forks source link

Problem Migrating Site Data #38

Open zakalwe2016 opened 8 years ago

zakalwe2016 commented 8 years ago

I am executing the following:

/usr/bin/php5 /path/to/piwik/console migration:site 21 --skip-archive-data --date-from=2016-02-29 --date-to=2016-03-25 --db-prefix=piwik_ -v

The output given is:

INFO [2016-03-25 21:21:26] Start transaction
INFO [2016-03-25 21:21:26] Migrating site config
INFO [2016-03-25 21:21:26] Loading existing actions
INFO [2016-03-25 21:21:26] Migrating log data - visits
INFO [2016-03-25 21:21:26] Migrating log data - link visit action
INFO [2016-03-25 21:21:26] Migrating log data - conversions and conversion items
INFO [2016-03-25 21:21:26] Commit transaction
DEBUG [2016-03-25 21:21:26] Time taken: 0.04 sec
DEBUG [2016-03-25 21:21:26] Peak memory usage: 14.00 MB

So everything seems fine. When I check the target database only one record is ported across but there are records in the piwik_log_visit table between the dates specified for that site in the source DB. The actions for the imported record are imported fine. There is no conversion data which needs migrating. The Piwik version I am using is 2.16.0 and plugin version is 1.0.8.

Am I missing something obvious?

mysnip commented 8 years ago

Did you ever get this solved? I currently see the same problem - even without specifying a daterange - and I'm trying to debug through the code.

mysnip commented 8 years ago

I got it solved for my case by creating a new db adapter in ActionMigrator and using it for the query in function ensureActionIsMigrated ... Seems like that query there was messing with the db connection which was used for getting the data, I didn't follow it completely through to provide a proper fix (and pull request) as I just needed to get it working.