Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start purging via command line #3199

Closed
anonymous-matomo-user opened this issue Jun 6, 2012 · 6 comments
Closed

Start purging via command line #3199

anonymous-matomo-user opened this issue Jun 6, 2012 · 6 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@anonymous-matomo-user
Copy link

I couldnt find a way to start the purging process via the command line. In case this already exists maybe it should be better documented.

Otherwise, it would be great to have this option (just like with the auto archiving script) so you dont have to deal with limits PHP might have and to get more debugging possibilities in case something goes wrong (Im currently trying to get purging to work with my 10 gb database).

@mattab
Copy link
Member

mattab commented Jun 17, 2012

You should be able to start the purge using the command line, by reproducing the same link as the "Purge now" link.

@mattab
Copy link
Member

mattab commented Jun 17, 2012

(In [6482]) Refs #3199

@anonymous-matomo-user
Copy link
Author

Do you mean calling the script via wget? That way, the script would still be influenced by the PHP limitations. I thought more of a shell script solution.

@mattab
Copy link
Member

mattab commented Jun 19, 2012

No I mean running it on the command line eg.

/usr/bin/php piwik/index.php -- "module=X&action=Y&etc."

I haven't tried but if you replace the module=X... by the URL it should run in CLI ?

@anonymous-matomo-user
Copy link
Author

The URL from "purge DB now" looks like this:
index.php?module=PrivacyManager&action=privacySettings&idSite=2&period=day&date=yesterday#

The only difference to the URL already opened is the "#" at the end, so I guess this will call some AJAX stuff which I cannot start from the CLI. Please correct me if I am wrong.

In case this works, would it show information about what is being done? That is the main problem why Im asking, as the purge run over night took ~10 hours to complete (purging from 5 to 4.2 gb) and I could only have a look at the SQL statements being run by using "MySQL Administrator" but didnt get any feedback/status from Piwik (or I couldnt find it).

Therefore, a user might assume that the process is stalled and kill the process.

@mattab
Copy link
Member

mattab commented Jul 19, 2012

UNfortunately it won't show the information being done, for that using the mysql admin tool is the best.

@anonymous-matomo-user anonymous-matomo-user added this to the 1.8.3 - Piwik 1.8.3 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants