How long do the log files containing the tracking data that Matomo collects stay available on the server?

There is missing data in my matomo database for one day. We are trying to recover this data from the log files and import it into Matomo.

Just want to know how long do these log files remain available on the server?

That depends on how you set up your Webserver. On a regular Ubuntu/Debian setup with Apache or nginx logrotate is deleting the files after a while and you need to check its config file to see how long this time is.

Thanks Lukas, Could you please tell where and how can we check this?

Not really. I don’t know your web server setup and it’s not Matomo or PHP, but your webserver which is writing these logs (and it’s not the webserver but potentially another programm that is deleting old logs).

So for a start I would need to know what web server you are using, what operating system you are using, what distribution you are using, if you are using Linux, etc.