Maintain PowerShell archive script settings during upgrade


#1

When I upgraded from 1.4 to 1.6 the archive.windows.ps1 file got replaced. The setup for archiving requires that the setting in the top of this file gets changed to point to the PHP directory that is being used. However when the script is replaced, this setting isn’t maintained so the auto-archive starts failing. Unfortunately it fails silently and the windows scheduler still thinks the script succeeded.

Please either move this setting to a config file that doesn’t get overwritten or maintain the setting when the file is upgraded.

The other thing that would be nice to have is for the script to actually return an error out of powershell when there is a failure so that the windows schedule task registers a failure.

And if you really, really want to make life easier on those of us that administer these things, have the script write out rolling logs of the output so we can verify that it is working.

Thanks.


(Matthieu Aubry) #2

Thanks for the feedback, the new script archive.php will allow better logging and better performance, you can already use it but it is not fully documented just yet, see New optimized archive.php script for faster and optimized archiving when hundreds/thousands of websites · Issue #2327 · matomo-org/matomo · GitHub


#3

So are you saying that the PowerShell script will be depricated and the PHP script is the forward-path for the offline archiving?


(Matthieu Aubry) #4

Yes, but the update to the powershell is still welcome is risk free and backward compatible.


(Matthieu Aubry) #5

All windows users, please now only use the “archive.php” cron, as documented here: How to Set up Auto-Archiving of Your Reports - Analytics Platform - Matomo