Auto Archiving on Windows Servers


(fearworksmedia) #1

Ok, here’s the thing…

Running Piwik on 3 Windows servers, with multiple sites on each.

I would like to auto archive every, say hour, or day, or whatever… much like the cron job setup described in the Docs section of this site.

Of course, you can’t run Linux Bash scripts in Windows without using something like cygwin, which does not like the archive.sh script for whatever reason.

Can anyone come up with a batch file or something similar that will do this properly and successfully? I’ve read the tickets about this, and supposedly the information is easily found by searching the net - but I can’t easily find it anywhere!! And if it is out there somewhere, it’s not easy to understand…

Or a PHP file that can be called by task scheduler, that updates all site’s data on the server - there is a plugin from document windows tasks for running archive · Issue #817 · matomo-org/matomo · GitHub which I’ve tried called “LaunchArchiving” but that seems to run through the Piwik API only on individual sites one at a time, because you have to include the site’s id and user’s token in the URL - I really want something that updates all the sites on the server automatically.

SOMEONE must know how to do it and be able to explain it in one place without posting links or telling me to search the net style_emoticons/<#EMO_DIR#>/sad.gif

Please, someone, you must be out there…


(Matthieu Aubry) #2

A windows user is working on it, see the message in: http://lists.piwik.org/pipermail/piwik-hac…May/000907.html
you might want to contact him directly and propose to test his script once ready. It should be included in core at some point.


(fearworksmedia) #3

Thank you for this info! I will keep my eyes open to see what he is able to come up with!


(fearworksmedia) #4

I’m not sure if it’s the same person who has posted his script here but it seems to work great!

Hopefully others will benefit from it like I did!


(Fabian Becker) #5

I’ve added a Powershell script to trac yesterday. (Archiving script: Port to Powershell · Issue #1411 · matomo-org/matomo · GitHub)