Auto archive by url


Hello, I’m trying to set up auto archive on my piwik installation. The problem is in the panel from my hoster I have a “fake cron”: it’s not really cron, it asks me a url for the task to be executed.
If I try to pass it gives no error since the file is reached, but obviously it isn’t executed.

Is there a php file that can be called to trigger auto archiving?


(Matthieu Aubry) #2

You can call the API with index.php?module=API&method=VisitsSummary.get&format=XML&idSite=1&period=year&date=last10

this will archive years, which are going to archive months and days.

however, you might have a memory issue, because all the reports will be archived in the same http request rather than many different ones with the


Thanks, I will try that… I assume I must append the token to the API call (?).

Meanwhile I’m trying to figure out how to transform the in a archive.php file to avoid the memory problem… I’m not an expert of bash and php, piwik neither, but if I’m success I will post the result. At the moment I’m stuck at the point where segments and periods are exported in csv format… I have to find a workaround to make it work in a php call (before that I have to find out HOW the bash script work and WHAT are segments and periods :-p )