Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running SSD servers because I have great experiences with performance. However I have webservers which serve lots of requests and the uncompresssed logfiles of one day tend to grow out the database.

I have usual standard format Webserver log files.

Is there maby a way to compress them "on the fly"?

share|improve this question
up vote 5 down vote accepted


This utility can automatically inform your daemon to switch logs as it renames and compresses them. Since daily is not enough, you could also run it hourly. Even if logged hourly, you can still concatenate them by day after compression with GZip.

Compressed filesystem

Btrfs can be setup with transparent encryption, automatically saving space in the background. Some other filesystems (ZFS, etc.) can also accomplish this.

Compression pipe

Apache will log directly to a pipe and most applications will write to a name pipe (mkfifo) which you can attach to your compression program.

share|improve this answer
Damn, beat me to it by 13 seconds. – HopelessN00b Nov 16 '12 at 17:49
great, thanks! nothing more to say... – The Shurrican Nov 17 '12 at 14:11

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.