serverTime

How to delete the records from (serverTime) and leave the last 3 months in postgresql?

Adrian Hodgson6 years ago

There is a configuration line that can be used in traccar.xml in the conf folder

database.historyDays
Number of days to store position and event history. By default Traccar doesn't clear any old data from the database.

I have used:-

<entry key='database.historyDays'>91</entry>

to remove anything over 91 days and seems to work for me.

Adrian

Yes, that statement makes me see in the reports up to 91 days, but I need to delete the data from the database history to reduce its size.
how can i do it in postgresql?

Anton Tananaev6 years ago

It removes the data from the database.

Adrian Hodgson6 years ago

And I can confirm it does as well, it keeps my home sever backup files to a few Meg of data after I zip them, before I used the history line it was constantly climbing so it does what it says on the tin.

Adrian