In the example shown above suppose if I want to see only zip file of sample.log and the original file sample.log to be moved to the other folder like /mnt .How we can do that ?please explain
Hi, I want to rotate catalina.out file, could u pls suggest how to do, catalina.out is generated when tomcat is running on linux server and size is getting huge, need some solution, could u pls suggest
when you create a custom logrotate file, what is the extension of that file or what is the file type? Can you share the command you used to create the logrotate file?
I am facing same problem in my job and after searching so much on internet i found this command to rotate logs . --log-opt max-size=10m --log-opt max-file=5 but i am unable to make it applicable in docker container to get the log of a service can someone please help me
Hi Ravi, Thanks for the session and it was useful. I am new to Linux.. I have a requirement where i need to keep last 6month log files and remove older than 6month log file.. Please provide steps how to ahieve this?.. Thanks in advance.
My solution would be like this: Rotate the log file daily, after rotation move the files to archive path like: /var/log/tibco/AddressService/Archive delete the files older than six months in archive. This way you will avoid large log files and easy to verify later point of time. Your solution also works.
More Linux Videos ruclips.net/video/eEd9EgIWFBg/видео.html
Join Telegram Group: t.me/linuxarkit
Your technical stuff is very good... I really appreciate you... Keep going
Thanks for watching. Please subscribe the channel and support me Srikanth.
I am thankful sir for providing good quality details about logrotate
Glad to hear that
Nice job ravi.. keep going... keep rocking
thanks sudheer.
I created one self log file to store application error message how i can set hourly to rotate my task on 4 time hourly basis
Trigger the logrotate from cronjob on hourly bases.
Hi wonderful video I have one doubt whether it deletes the rotated files or not?
it will delete based on the policy you set.
In the example shown above suppose if I want to see only zip file of sample.log and the original file sample.log to be moved to the other folder like /mnt .How we can do that ?please explain
Good question, no need to move sample.log file because when you extract zip file it will extract with time stamp at the end.
How to run logrotator on custom time lets say 10 pm every day
can you share cron job script???
Schedule it on Crontab logrotate -f logrotatefile.conf. OR update the logrorate crontab file.
@@TechArkit can you please share a script for a example
I'm absolute beginner
It's very useful.thanks for making this video.
You are most welcome
how can i logrotate of only on one configuration file....becouse when u r doing logrotate -f /etc/logrotate.conf ...all logs are rotating........
Create another lorotate.conf file with required log rotate files.
Hi, I want to rotate catalina.out file, could u pls suggest how to do, catalina.out is generated when tomcat is running on linux server and size is getting huge, need some solution, could u pls suggest
use similar configuration instead of .log replace with .out
when you create a custom logrotate file, what is the extension of that file or what is the file type? Can you share the command you used to create the logrotate file?
Just copy the existing logrotate file and change the definations
I am facing same problem in my job and after searching so much on internet i found this command to rotate logs . --log-opt max-size=10m --log-opt max-file=5 but i am unable to make it applicable in docker container to get the log of a service can someone please help me
your docker image might be missing required packages.
awesome explanation, thank you . as usual learnt a new topic.
Thanks Sasi, Please subscribe the channel.
Dear Arkit, can you make one more video for sending some .log file in /tmp directory to send through rsyslog to some syslog server
Just change the paths concept is same.
@@TechArkit thanks Arkit, let me try this out.
Thank you so much, it helped a lot! :)
Glad it helped!
Really good. I want to know whether we can rotate a non .log (message.json) file through this? If yes may I know the config snippet?
Yes, you can do, instead of .log mention the extension you wanted to rotate, but it should be text format.
Hi Ravi, Thanks for the session and it was useful. I am new to Linux.. I have a requirement where i need to keep last 6month log files and remove older than 6month log file.. Please provide steps how to ahieve this?.. Thanks in advance.
/var/log/tibco/AddressService/*.log
{
missingok
monthly
rotate 6
notifempty
}
This script can i add in the logrotate.conf
My solution would be like this: Rotate the log file daily, after rotation move the files to archive path like: /var/log/tibco/AddressService/Archive delete the files older than six months in archive.
This way you will avoid large log files and easy to verify later point of time.
Your solution also works.
Thanks bro it is going to help a lot
Yes it will, Thank you.
Fantastic sir
So nice of you
Great Video
Thanks.