Archiving from scratch hindered by previous started queue


#1

I am archiving from scratch to make sure that all archives have been created correctly.

Running the process off-line on another server, and deleting all piwik_archive_* tables, I run the following command:


<terminal> php /my/path/console core:archive --force-all-websites --force-all-periods=315576000 --force-date-range=2012-08-08,2015-06-15 -vvv --url=http://www.example.com/

The command is running fine, but I get a message that only some websites will get processed, due to the following message from the archive script:


"- Will process all nn websites"
"Will ignore websites and help finish a previous started queue instead. IDs: n1, n2, n3 . . ."

Since I have deleted all piwik_archive_* tables, and forcing all periods and date ranges when calling the: “console core:archive” script, I was not expecting the script to somehow use a previous queue.

Question:
How can I delete this archive queue so I can get a fresh archive for all website ID’s?

Thanks!


#2

Investigating this a little bit further, it seems like editing the “config/config.ini.php” option under: “1) Cleanup the existing archived data”, see How do I force the reports to be re-processed from the logs? - Analytics Platform - Matomo , needs to be done in ADDITION to deleting the tables: “piwik_archive_*” as I had already done.

So in “config/config.ini.php” I added the following and now the archiving process forgets the queue and process all sites:


[Debug]
always_archive_data_day=1 ; force archiving of all daily reports
always_archive_data_period=1 ; force archiving for all period reports (week, month, year)

As the FAQ under How do I force the reports to be re-processed from the logs? - Analytics Platform - Matomo mentions that you can either delete all the “piwik_archive_*” tables OR “config/config.ini.php” as shown above, this should maybe be changed in the FAQ?

So to summarize I ended up with:

  1. Editing “config/config.ini.php”:

[Debug]
always_archive_data_day=1 ; force archiving of all daily reports
always_archive_data_period=1 ; force archiving for all period reports (week, month, year)

  1. And then running the command:

<terminal> php /my/path/console core:archive --force-all-websites --force-all-periods=315576000 --force-date-range=2012-08-08,2015-06-15 -vvv --url=http://www.example.com/

If just editing 1) above, I guess I could run just (?):


<terminal> php /my/path/console core:archive --force-all-websites -vvv --url=http://www.example.com/

Is that correct?
Would I need to keep the “–force-all-websites” part of the command, or could I skip that as well?

Thanks!


(Matthieu Aubry) #3

Hi there,

Thanks for your feedback.

How can I delete this archive queue so I can get a fresh archive for all website ID’s?

This feature is missing and it would be super useful. maybe a new --ignore-queue that would just ignore whatever queue is there? or maybe a --clear-queue that would actually clear whatever queue was there. Would you mind creating an issue and we can decide over there? Issues · matomo-org/piwik · GitHub

Once we add this, we will need to update the FAQ to add this parameter (and maybe also add it in the command in the log analytics output summary)