可以看看zfs/btrfs等支持压缩的文件系统是否满足需求,省事多了
【 在 poocp (慢速随机指标) 的大作中提到: 】
: 文本日志文件,单个文件大小在100KB到50MB区间内的情况下,都用-9参数(xz用-9e),lzip比xz全面领先。
: 所以我现在的脚本是每个月压缩一次上个月按周切分的日志为每个文件单独.lz格式不用tar打包,配合catlz可以随时查看,每年将12个月全部.lz日志解压进年份子目录后重新压成.tar.xz包做长期归档。
:
: 4700 auth.log-20210221.lz
: 4840 auth.log-20210221.xz
: 2748 auth.log-20210228.lz
: 2880 auth.log-20210228.xz
: 1986 cron.log-20210221.lz
: 2068 cron.log-20210221.xz
: 3728 cron.log-20210228.lz
: 4044 cron.log-20210228.xz
: 9050 dd-wrt-R6300v2.log-20210228.lz
: 9144 dd-wrt-R6300v2.log-20210228.xz
: 23748 kern.log-20210221.lz
: 24524 kern.log-20210221.xz
: 17027 kern.log-20210228.lz
: 17424 kern.log-20210228.xz
: 23603 messages-20210221.lz
: 24184 messages-20210221.xz
: 16872 messages-20210228.lz
: 17176 messages-20210228.xz
: 22797 app01.log-20201220.lz
: 23232 app01.log-20201220.xz
: 22487 app01.log-20201227.lz
: 22788 app01.log-20201227.xz
: 28098 app01.log-20210103.lz
: 28564 app01.log-20210103.xz
: 21357 app01.log-20210110.lz
: 21740 app01.log-20210110.xz
: 18805 app01.log-20210117.lz
: 19236 app01.log-20210117.xz
: 580405 app01.log-20210124.lz
: 583424 app01.log-20210124.xz
: 63046 app01.log-20210131.lz
: 64060 app01.log-20210131.xz
: 46939 app01.log-20210207.lz
: 47612 app01.log-20210207.xz
: 69349 app01.log-20210214.lz
: 70272 app01.log-20210214.xz
: 33454 app01.log-20210221.lz
: 33940 app01.log-20210221.xz
: 37128 app01.log-20210228.lz
: 37712 app01.log-20210228.xz
: 29155 app02.log-20201220.lz
: 29800 app02.log-20201220.xz
: 58173 app02.log-20201227.lz
: 59028 app02.log-20201227.xz
: 26018 app02.log-20210103.lz
: 26404 app02.log-20210103.xz
: 31616 app02.log-20210110.lz
: 32440 app02.log-20210110.xz
: 25310 app02.log-20210117.lz
: 25620 app02.log-20210117.xz
: 112345 app02.log-20210124.lz
: 113976 app02.log-20210124.xz
: 27393 app02.log-20210131.lz
: 28032 app02.log-20210131.xz
: 71598 app02.log-20210207.lz
: 72652 app02.log-20210207.xz
: 72994 app02.log-20210214.lz
: 74352 app02.log-20210214.xz
: 45050 app02.log-20210221.lz
: 46072 app02.log-20210221.xz
: 74755 app02.log-20210228.lz
: 75928 app02.log-20210228.xz
: 84841 app03.log-20201220.lz
: 86164 app03.log-20201220.xz
: 80511 app03.log-20201227.lz
: 81712 app03.log-20201227.xz
: 52526 app03.log-20210103.lz
: 53336 app03.log-20210103.xz
: 58658 app03.log-20210110.lz
: 59620 app03.log-20210110.xz
: 34212 app03.log-20210117.lz
: 35212 app03.log-20210117.xz
: 69930 app03.log-20210124.lz
: 71220 app03.log-20210124.xz
: 130900 app03.log-20210131.lz
: 131888 app03.log-20210131.xz
: 84796 app03.log-20210207.lz
: 86960 app03.log-20210207.xz
: 136722 app03.log-20210214.lz
: 139940 app03.log-20210214.xz
: 106212 app03.log-20210221.lz
: 108676 app03.log-20210221.xz
: 81056 app03.log-20210228.lz
: 81748 app03.log-20210228.xz
:
--
FROM 115.171.202.*