How long are which logs kept?
-
Hi,
I could not find the information and I really would like to know:
- How long are the logs per App kept?
- How long are the Mail-log kept?
- How long are the Cloudron log are kept?
- Is Cloudron somehow involved into the log rotation of the server it is running on (as in: does is change standard values?)
I could not find anything about it in the docs or the forum (or I am blind somehow?!)
Tanks for explaining
-
@jaschaezra Indeed, this information is not documented. I will add it to the docs tomorrow.
To answer quickly, log rotation is setup via logrotate. You can find the configs here and here .
-
-
-
-
@girish Thank you.
I now have a problem here: I need to write down in my privacy statement, how long the logs are kept, not how much of them.
If there is just small traffic e.g for mail then it could take months till they are deleted.
I would suggest to have two criteria for logs rotation: 10MB or end of week. Delete all logs that are older than 4 weeks.
Then I could write "Logfiles are kept for (reasons) and are deleted latest after 4 weeks automatically." I just can not write "it is deleted when there are 10MB of data." -
@jaschaezra I think at a general level, this is hard to "guarantee". We try our best when packaging to make apps log to stdout and then capture the stdout into log files which are then rotated. However, there are apps that just log to files inside the container. These also we try our best to track and rotate automatically. Apps also track things in their databases and redis caches etc.
I guess what I am saying is that if this for legal purposes, I wouldn't rely on logrotate configs for this. I would take this on a per app basis and write some custom script that just deletes the logs on the server. This can be a simple hardcoded script since the app log files won't change. You can just truncate the log files to 0 size, Cloudron code handles it fine.
-
@girish The Apps that do their own logging not to stdout are not what I am worrying about.
I think a log rotate for the ones that do stdout logs / are under your control there should it be a defined timeframe when the data is purged as this is what legally required is in the EU due to the GDPR (you need to tell which personal data is stored and how long for what purpose)
So data in a redis cache is not a problem at all as there is only personal data involved when the site is used by the person and will fall out if the cache. But IPs logged in a server or app log are "personal data" in terms of the GDPR.
-
-
@jaschaezra OK, I have adjusted the logrotate configs to be 14 days max for the next release.
-
-
@girish said in How long are which logs kept?:
I have adjusted the logrotate configs to be 14 days max for the next release.
Was going to suggest this be customizable as everyone may have different legal requirements or use-cases for retention of logs, but I think 14 days is totally fine for most cases for now. Maybe that can be made to be customizable in the future though.
Slightly related example: I tend to only have about 1-2 days worth of email history to review but sometimes it takes a few days before I'm notified of anyone having issues with a certain email incoming for example and I'd find it much more effective if I had maybe 3-6 days of email logs in the event viewer rather than 1-2 days at my current log activity levels (as I think it's just up to 10 MB of logs regardless of dates), would be great to have better control over those log retention settings to solve that sort of use-case too for example.