Traccar Database Full

Karlosvalenzuela2 years ago

Hello, I am new to all this and I would like to know how I can clean my position database or how I could configure it, please, thank you in advance

Anton Tananaev2 years ago
Karlosvalenzuela2 years ago

Hi Anton, sorry, I'm new, I don't know how to use those commands, where I should put it or what program I should install, sorry for the inconvenience

Anton Tananaev2 years ago

What database are you using? Are you familiar with SQL?

Karlosvalenzuela2 years ago

MySQL I am using

Karlosvalenzuela2 years ago

hello anton my database is 99% full and I don't know how to reduce the space please, what happens if it fills up completely how can I need help please I don't know about this

Karlosvalenzuela2 years ago

I put this

DELETE FROM tc_positions WHERE servertime < DATE(NOW() - INTERVAL 100 day);
DELETE FROM tc_statistics WHERE capturetime < DATE(NOW() - INTERVAL 100 day);
DELETE FROM tc_events WHERE servertime < DATE(NOW() - INTERVAL 100 day);

but it made it fill up faster apparently :(

Anton Tananaev2 years ago

Removing data doesn't reduce the file size, but it clears the space in the file, so it shouldn't grow after you free up enough space for the new data.

Karlosvalenzuela2 years ago

What can I do please, I am blocked and I can no longer enter my database, I get

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Anton Tananaev2 years ago

It probably means your database is down.

Karlosvalenzuela2 years ago

And what do I have to do to restore it please?

Karlosvalenzuela2 years ago
/dev/vda1         100% /
Karlosvalenzuela2 years ago

I put this
tc_positions.frm
tc-positions.ibd

Karlosvalenzuela2 years ago

ANTON deleted the tc_positions.ibd table and I entered but now I get no devices and they load a few at a time but when I update the page they are deleted and they come back little by little
can i create the tc.positions.ibd table or what should i do please i need help

Anton Tananaev2 years ago

You just removed the files? I don't know what to about that. That probably means your database is irreparable. You need to restore a backup or start over.