Add script to compress log files every month to reduce storage
Signed-off-by: Pedro Moura <pmoura@redhat.com>
This commit is contained in:
parent
7d7d0bf0a8
commit
1b05dd52ba
3 changed files with 12 additions and 0 deletions
5
roles/web-data-analysis/files/compress_logs.sh
Normal file
5
roles/web-data-analysis/files/compress_logs.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
LOGS_PATH='/mnt/fedora_stats/combined-http'
|
||||
|
||||
find $LOGS_PATH/20?? -type f -name -not -path $LOGS_PATH/`date +%Y`/`date +%m`/* "*.log" -exec xz -z {} \;
|
|
@ -1,2 +1,3 @@
|
|||
MAILTO=root@fedoraproject.org,nils@redhat.com,asaleh@redhat.com
|
||||
0 06 * * * root /usr/local/bin/condense-mirrorlogs.sh > /dev/null
|
||||
0 09 5 * * root /usr/local/bin/compress_logs.sh > /dev/null
|
Loading…
Add table
Add a link
Reference in a new issue