clear the history

islam bahaz3 years ago

hello
I want to clear the history
how do I do that ?
Or I just want to set the history for 1 month
pleas help me

Anton Tananaev3 years ago

Have you checked the documentation?

https://www.traccar.org/clear-history/

islam bahaz3 years ago

I have windows server can i do this ?

Anton Tananaev3 years ago

The documentation is for Linux, but should give you an idea on how to do it.

By the way, what database are you using? Hopefully not H2.

islam bahaz3 years ago

I don't know i install it in the windows server normely in RDP
How can i know which database ?

Anton Tananaev3 years ago

The default is H2. You should never use it for a production server.

islam bahaz3 years ago

What do i have to do now ?

Anton Tananaev3 years ago

Install a proper database (e.g. MS SQL Server) and create a script to clean up old data.

islam bahaz3 years ago

Please can you tell me how can a create a scipt

Anton Tananaev3 years ago

I can't provide step by step guide for that. I don't even have a Windows machine. But the documentation should give you an idea of what it should look like.

Macan3 years ago

Install mysql server on windows and then you can use CMD to clear database history .
https://www.liquidweb.com/kb/install-mysql-windows/

islam bahaz3 years ago

Thank you i will try it but i don't know how to clear database in CMD
Please can you give me the command ?

Macan3 years ago

Hello Islam,

Install phpmyadmin on your localhost and then create an Event in the phpmyadmin.

islam bahaz3 years ago

Can i create an event to clear history every day ??