Would it be possible to add gzip archiving support to the log module? Basically, the desired functionality would be to have the logs automatically gzip'd on start or on date change. (When ZNC starts, the log module can check for non-gzip'd logs, and archive them accordingly.)
Users' logs take up a lot of space (gigabytes for some), and while cronjobs might not hurt, it wouldn't be a bad idea to have automatic gziping in place.
Would it be possible to add gzip archiving support to the log module? Basically, the desired functionality would be to have the logs automatically gzip'd on start or on date change. (When ZNC starts, the log module can check for non-gzip'd logs, and archive them accordingly.)
Users' logs take up a lot of space (gigabytes for some), and while cronjobs might not hurt, it wouldn't be a bad idea to have automatic gziping in place.
##
<bountysource-plugin>
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/6964225-add-gzip-support-to-log-module?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
</bountysource-plugin>
<!-- github-sync-id:51779218 -->
10/10 would love this - but IRC has been slowing down recently (same with ZNC). If I get a chance, I might add it myself :)
10/10 would love this - but IRC has been slowing down recently (same with ZNC). If I get a chance, I might add it myself :)
<!-- github-comment-id:316883146 -->
I run the cronjob /usr/bin/find /var/lib/znc/.znc/users -mtime +1 -type f -name *.log -exec /usr/bin/gzip {} \; once a night to compress logs.
I run the cronjob `/usr/bin/find /var/lib/znc/.znc/users -mtime +1 -type f -name *.log -exec /usr/bin/gzip {} \;` once a night to compress logs.
<!-- github-comment-id:366213259 -->
I like --name --best --rsyncable combination of gzip flags:
echo"# Run daily and gzip >1 day old logs that are not yet gziped
0 1 * * * znc /usr/bin/find /var/lib/znc/moddata/log/ -mtime +1 -type f -name '*.log' -exec /bin/gzip --name --best --rsyncable {} \;
" > /etc/cron.d/znc-gzip-logs
Correct for the log dir location and znc user name.
I like `--name --best --rsyncable` combination of gzip flags:
```sh
echo "# Run daily and gzip >1 day old logs that are not yet gziped
0 1 * * * znc /usr/bin/find /var/lib/znc/moddata/log/ -mtime +1 -type f -name '*.log' -exec /bin/gzip --name --best --rsyncable {} \;
" > /etc/cron.d/znc-gzip-logs
```
Correct for the log dir location and znc user name.
<!-- github-comment-id:388602925 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Would it be possible to add gzip archiving support to the log module? Basically, the desired functionality would be to have the logs automatically gzip'd on start or on date change. (When ZNC starts, the log module can check for non-gzip'd logs, and archive them accordingly.)
Users' logs take up a lot of space (gigabytes for some), and while cronjobs might not hurt, it wouldn't be a bad idea to have automatic gziping in place.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/6964225-add-gzip-support-to-log-module?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).10/10 would love this - but IRC has been slowing down recently (same with ZNC). If I get a chance, I might add it myself :)
+1, I'm really interested in this! Thanks for the suggestion
I run the cronjob
/usr/bin/find /var/lib/znc/.znc/users -mtime +1 -type f -name *.log -exec /usr/bin/gzip {} \;once a night to compress logs.I like
--name --best --rsyncablecombination of gzip flags:Correct for the log dir location and znc user name.