The first time you run Log Analytics, you may import a lot of historical data, maybe months or years of past log data. After this data was imported, to archive all historical report data run this command once:

./console core:archive --force-all-websites --url=http://example/matomo

After the initial data log import, you likely would import log files hourly or daily into Matomo (Piwik).
Put the following command in a cron to process archives after the logs are imported hourly or daily:

./console core:archive --url=http://example/piwik/

See also: How to setup reports auto archiving

If you are running Matomo 3.x

Run the following command instead after importing your logs to archive all historical data:

./console core:archive --force-all-websites --force-all-periods=315576000 --force-date-last-n=1000 --url=http://example/matomo