I have a couple of .log.#.gz files. (the # is a number) For example i have a ufw.log, a ufw.log.1.gz...all the way to ufw.log.4.gz. Are these .log.#.gz files old log files that got compressed? What daemon manages this (logrotate?) Is .gz that good?( i am asking this because ufw.4.log.gz is 98 megs while the ufw.log is 3.2 gb)
Yes, ..X.gz files are compressed log files from previous periods, and are controlled using logrotate. [ You can check out the settings in /etc/logrotate.d/ ]
.gz is good at compressing text - in the same order of magnitude as "zip". I suspect that a lot of what is in your log files are being repeated multiple times, making it very compressible.
A .gz file is normally created by gzip (http://www.gzip.org/). It's possible these are compressed log files, especially considering the similarity in file names with the uncompressed file. Perhaps the simplest way is to try to decompress one of the files and see what's in it.
This question discusses the compression ratio of gzip. The compression you see is possible, though it is pretty high.
This site suggests the log may be an audit log.