Question on running console:archive for auto-archiving instead of archive.php


(Dan Poynor) #1

In archive.php I see the text:
Using this ‘archive.php’ script is no longer recommended.
Please use ‘/path/to/php $piwikHome/console core:archive " . implode(’ ‘, array_slice($_SERVER[‘argv’], 1)) . "’ instead.
To get help use ‘/path/to/php $piwikHome/console core:archive --help’

The console isn’t mentioned at How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo though and I can’t find any detailed examples right off.

It looks I just need this command in my crontab:
/path/to/php54 /path/to/piwik/console core:archive --piwik-domain=[mydomainname.com/piwik/]

Does that look about right? Or should the piwik-server-url be in single quotes perhaps, or without brackets?

Also since I’m tracking multiple domains do I need to add --force-all-websites ?


#2

Matt updated that page (How to Set up Auto-Archiving of Your Reports) yesterday…

You were not alone discovering, by luck, this new way of doing things…

Dali


(Matthieu Aubry) #3

Does that look about right? Or should the piwik-server-url be in single quotes perhaps, or without brackets?

Looks good!

Also since I’m tracking multiple domains do I need to add --force-all-websites ?

You shouldn’t have to. But please apply this patch which fixes an issue: Setting the default timezone to UTC in the core:archive script, refs … · matomo-org/matomo@22e8a7a · GitHub