-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Document how to Upgrade Piwik without losing any tracking data #9186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The logs itself are written by your webserver, eg apache. There could be maybe a script that gets all requests between upgrade start and upgrade end and then replaying these logs. The last upgrades did not include any schema changes so the updates should have taken only a few seconds but it obviously depends on the setup etc. Also there might be upgrades that take longer in the future and there might be plugins that take a long time when installing them (eg the new plugin CustomDimensions will take a long time when installing it via Marketplace). There is a plugin QueuedTracking that writes all requests into a queue similar to how you described but it would do it all the time, even when you are not upgrading. |
Hi @tsteur I was thinking more along the lines of a custom log file just for piwik.php, as the Apache access file contains all page hits for the Piwik website. We're trying to come up with a solution where an upgrade can be completed where no requests will be dropped, as we track all visits with userid and a custom variable to map a user's actions through our sites. If we use the Redis plugin, I imagine we can stop the queue processing, upgrade the site then re-enable the queue processing, that will then pick up and slowly process all hits during the upgrade process? Are there issues when uploading new versions of the plugin/piwik and there being a time where the upgrade has not completed so it will not track requests? |
It should work with the Redis plugin but I haven't tested it. Basically you could:
|
We have this FAQ: How do I upgrade a large Piwik instance without losing any tracking data? I've just added in the FAQ the following: Option 2The second option requires the use of the [QueuedTracking plugin][4] with Redis.
If you have any feedback or suggestion, please leave a comment below. --> marking as closed as it's now documented. if there is any problem or question ask here or in the FAQ comment box |
Hi all,
It would be great if using the command line upgrade or the web upgrade would automatically replay the logs for you once complete.
Currently there is no easy way to do this as it requires somehow finding the correct "piwik.php" requests in a very large Apache log file and then importing them using the python import file.
If there was a config option to redirect logs or similar, so that when it comes to the
shouldRecordStatistics()
function in core\Tracker.php it is able to divert or create a special log file in the /tmp dir, that file could then be imported once the upgrade has been completed without losing any tracking information.Are there any plans to reconfigure how upgrades work so that larger installations can update more easily?
Thanks
Alex
The text was updated successfully, but these errors were encountered: