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

Request: delete database button - Easy way to remove database but keep site settings, via websites/manage #16248

Open
user908348 opened this issue Jul 28, 2020 · 1 comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@user908348
Copy link

Via "Websites/Manage Measurables" you can edit, delete or add websites, I would like to see a "delete all data" there as well to clear the data and import the logs again so that I can start with a clean slate after playing around with configuration settings.

I've found various faqs[1] but they don't seem to actually clear/remove the data from the database as I'm still seeing stats when I view data in Matomo (quite possibly I'm doing something wrong). Regardless of working commands to enter via the console, a simple to use "clear all data" from the website interface would save a lot of time.

Perhaps others find it useful as well.

Please feel free to post to the correct FAQ/help pages on how to actually delete all data with all steps as well..

[1]

@tsteur tsteur added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Jul 28, 2020
@tsteur
Copy link
Member

tsteur commented Jul 28, 2020

Hi @user908348

thanks for creating this issue. We likely won't add this feature to the UI as it's very rarely needed and we'd want to prevent issues where someone deletes data without actually wanting it for some reason.

Here's how you could delete most of the data:

show tables like "matomo_archive%";
-- you may need to adjust the table prefix "matomo_"

then remove each of these tables by executing drop table $TABLE_NAME .

show tables like "matomo_log_%";
-- you may need to adjust the table prefix "matomo_"

delete all data within each of these tables by executing delete from $TABLE_NAME.

I know this is not the best solution and a command or something be easier but hoping this helps. This is basically what is described in https://matomo.org/faq/how-to/faq_73/

@tsteur tsteur added this to the Backlog (Help wanted) milestone Jul 28, 2020
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.
Projects
None yet
Development

No branches or pull requests

2 participants