Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I was just wondering, cause i want to study Computers and such....

How long the log files are keep in webservers, i mean, the documents that keeps register of incoming IP connections that enter to a webpage, it is permanent or are deleted after some time

to say, someone enters to a webpage once in his life, and never returns, one knew that the server keeps a log with the Ip Adress and date time, but for how long, what happens after lets say 1 year?

i ve heard something about server or memory space that the logfiles need, those this play an important role?, cause i heard that in small pages, the servers keeps the log for 3 weeks, and then what?

thanks

share|improve this question
add comment

4 Answers

It depends on the technology you're using, legal requirements you may have, or company and\or business policies and practices that may be in use.

We run IIS on Windows and as such, there's no built in log management capability. We have no legal or business requirements to keep log files so I have a recurring task set up to delete all log files older than 30 days. We keep the most recent 30 days of log files on hand for tracking and troubleshooting purposes. My thought is that if I haven't had the need to look at those log files in the last 30 days then I probably won't have the need to look at them.

share|improve this answer
add comment

Many places have policies on how long you're allowed to keep log files in their original state. For the US Government, it's 30 days after you rotate the logs. (and unless you have a really quiet server, you can't get away with never rotating your logs.)

IP addresses really aren't that useful to keep for long periods (on the scale of years) -- people move networks, so if you're trying to identify any information about your users (eg, what country/company/etc they came from), you need to do the lookups at the time of the access or shortly after.

It's also possible that the company might have information about their retention policy in a human-readable policy statement, or in a P3P file (see RETENTION; it's not a specific time, but general info if they retain logs forever, destroy immediately, or somewhere in between)

share|improve this answer
add comment

How long the log files are keep in webservers, i mean, the documents that keeps register of incoming IP connections that enter to a webpage, it is permanent or are deleted after some time

It completely depends on how the sysadmin has things set up. When setting up log rotation, some people will keep logs for 4 weeks, some for 4 years. Most often than not, logs will get backed up onto tape (or some other backup media) as well, so depending on tape rotation and expiry, logs can be around for a very long time.

to say, someone enters to a webpage once in his life, and never returns, one knew that the server keeps a log with the Ip Adress and date time, but for how long, what happens after lets say 1 year?

Once again, completely depends on how things are configured.

i ve heard something about server or memory space that the logfiles need, those this play an important role?, cause i heard that in small pages, the servers keeps the log for 3 weeks, and then what?

Most log rotation systems have the ability to compress the inactive log files. Since logs are just text/ascii data, they compress very well and usually don't take up all that much space. That said, it's certainly possible to get into a situation where you get a burst of traffic to your site and end up filling up your partition with log files. This is why it's recommended to keep logs on a separate partition. That way if it fills up, it doesn't affect the rest of your application.

share|improve this answer
add comment

In reality on badly managed systems: untill the disk fills up, then they are cleaned. ;-)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.