Forums

Historic access logs

The logging pages show access log files going back a month or so for the website. Are older logs (eg going back say 6 months) deleted from the servers completely?

It's a little more complicated than just a time-based removal of the logs; we rotate them daily if they're larger than 100KiB. Let's say that your site is www.yoursite.com; its access log will be www.yoursite.com.access.log. Each day:

  • If www.yoursite.com.access.log is less than 100KiB in size, we do nothing.
  • If it's larger than that, we rename it to www.yoursite.com.access.log.1 and then start a fresh log file.
  • However, if there's already a file called `www.yoursite.com.access.log.1, we gzip it and rename it to www.yoursite.com.access.log.2.gz
  • ...but if a file with that name already exists, we rename it to www.yoursite.com.access.log.3.gz first

...and so on, up to www.yoursite.com.access.log.10.gz, which we just delete.

That means that if your access log is growing by 100KiB a day, then you'll have ten days worth of access logs stored. But if it's getting less, then you may have more. You can see all of the historical logs in /var/log in your private file storage.

So in short you store the last 1MB +/- 100kB of log data and anything beyond that is irretrievable, irrespective of timescale?

It could be more than that; imagine that you were getting lots of traffic, and generating 1MiB/day of access logs. That would then mean that we'd be rotating the files every day, so you'd have the last 10MiB (and, of course, the fact that the rotated files from 2 upwards would be compressed would mean that it would take up less space on disk).